View Full Version : Solved Always redirecting back to home....
Hi,
first of all: Great piece of software...I paid the 90 bugs and it was a pleasure...
I installed it and it runs great as long as I have the option " Add language parameter to URL (i.e. 'address?language=en')
Create URL's according to SEO link consensus (i.e. '/en/address')".
But as soon as I switch to "Create URL's according to SEO link consensus (i.e. '/en/address')" I have some trouble....
Check this page:
pedi/cabfo/rum.com/forums/de/forum.php
Please delete / in the word pedicab ....
As soon as I click any thread it goes back to the English language Home....
Mmmmmh....
I added the root /forums, defined the master language English and added to htaccess:
RewriteEngine On
#RULES for SEO translation links without any SEO engine (on raw vBulletin links)
#If you are using vB 'Mod Rewrite Friendly URLs' then put those rules JUST BEFORE vB rules
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|sq|ca|et|tl|gl|hi|id|lv|lt|mt|sl|uk|vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ $2?language=$1 [QSA]
Any clue what could be wrong?
Thank you
Gerald
Update: I always get an 404 Error using "Create URL's according to SEO link consensus (i.e. '/en/address')"....
So I switched back to Add language parameter to URL (i.e. 'address?language=en') which works at the moment...
Would be great if you could help to get it work
Tx
Hi.
As I see it is working now - please confirm If I missing something :)
Important thing - you didn't set 'Strict' for option "Enforce Canonical URL" - it is required, otherwise you will loose your SEO. Please see readme.html from vBET package and fallow vB configuration instructions.
Hi Michal,
Thank you - I switched to "Enforce Canonical URL" now.
It works, but the problem still exists...
My configuration right now:
ON Advanced Friendly URLs
ON Create URL's according to SEO link consensus (i.e. '/en/address')
.htaccess as above / as in ReadMe.
It works going for example to a German translation - I post a slash in the Url as I am not allowed to post URLs...
p/edicabforum.com/forums/de/forumdisplay.php/32-Introduce-Yourself
Everythin OK
_____________________________________________
Problem:
As soon as I switch to
Mod Rewrite Friendly URLs
The Url above is now
p/edicabforum.com/forums/de/32-Introduce-Yourself
and I get 404 Errors.
_____________________________________________
...so the problem is not solved...it works well in Advanced Friendly URLs mode, but not with Mod Rewrite Friendly URLs
_____________________________________________
In my .htaccess is only your code:
RewriteEngine On
#RULES for SEO translation links without any SEO engine (on raw vBulletin links)
#If you are using vB 'Mod Rewrite Friendly URLs' then put those rules JUST BEFORE vB rules
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|sq|ca|et|tl|gl|hi|id|lv|lt|mt|sl|uk|vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ $2?language=$1 [QSA]
_____________________________________________
I tried it also with the mix from the VB-htaccess and your code, but I get an 500 - Internal Server Error
RewriteEngine on
# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
# RewriteBase /forum/
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# Forum
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|sq|ca|et|tl|gl|hi|id|lv|lt|mt|sl|uk|vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ $2?language=$1 [QSA]
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
RewriteRule ^blogs/.* blog.php [QSA]
ReWriteRule ^entries/.* entry.php [QSA]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
_____________________________________________
If I use just the VB-Code which comes with the Installation pack in the do not upload directory:
RewriteEngine on
# If you are having problems or are using VirtualDocumentRoot, uncomment this line and set it to your vBulletin directory.
# RewriteBase /forum/
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
RewriteRule ^blogs/.* blog.php [QSA]
ReWriteRule ^entries/.* entry.php [QSA]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
# MVC
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
the URL is converted to
p/edicabforum.com/forums/forums/32-Introduce-Yourself
As you see: It added forums once again...and I get "Invalid Forum specified."
So I guess that the problem is the htaccess and the rules....my VB is (vBulletin 4.0.2 Patch Level 1)....I guess first I have to fix this problem with VB and then to try again....
Saludos
Gerald
If it is working on with one of Friendly URL setting it is good news - you have no issues with vBET :) So - when you change Friendly URL to Mod rewrite you have error - it means that issue is in .htaccess file just as you suspect.
First - please make sure that your .htaccess file is OK for normal (not translated) URLs. So set there rules required by vB and test it. After that put vBET rules BEFORE vB rules. This is how looks .htaccess file on our test vB4 forum:
RewriteEngine On
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|sq|ca|et|tl|gl|hi|id|lv|lt|mt|sl|uk|vi|cy|yi)/archive/index.php/(.*)?$ archive/index.php?/$2&language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/$ index.php?language=$1 [L,QSA]
RewriteRule ^/?(af|sq|ar|be|bg|ca|zh-CN|hr|cs|da|nl|en|et|tl|fi|fr|gl|de|el|iw|hi|hu|is|id|ga|it|ja|ko|lv|lt|mk|ms|mt|no|fa|pl|pt|ro|ru|sr|sk|sl|es|sw|sv|zh-TW|th|tr|uk|vi|cy|yi)/(.*)?$ $2?language=$1 [QSA]
#vB FRIENDLY URL RULES
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^threads/.* showthread.php [QSA]
RewriteRule ^forums/.* forumdisplay.php [QSA]
RewriteRule ^members/.* member.php [QSA]
RewriteRule ^blogs/.* blog.php [QSA]
ReWriteRule ^entries/.* entry.php [QSA]
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(?:(.*?)(?:/|$))(.*|$)$ $1.php?r=$2 [QSA]
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.