The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Language based redirect with .htaccess
Hello, everybody. My forum https://www.hspir.it is in two languages, English and Italian. All English topics are in the directory https://www.hspir.it/en, Italian topics are in https://www.hspir.it/it. I would like that people using an English browser would automatically be redirected to the first folder, Italians to the second. I tried to configure a .htaccess file, but, as soon as I uploaded it, the forum became impossible to open, or I saw a message saying that there were too many redirects. I tried these two kind of codes in .htaccess:
Code:
RewriteEngine on RewriteCond %{HTTP:Accept-Language} (it) [NC] RewriteRule .* https://www.hspir.it/it [L] RewriteCond %{HTTP:Accept-Language} (en) [NC] RewriteRule .* https://www.hspir.it/en [L] Code:
RewriteEngine on RewriteCond %{HTTP:Accept-Language} (it) [NC] RewriteRule ^$ https://www.hspir.it/it [L] RewriteCond %{HTTP:Accept-Language} (en) [NC] RewriteRule ^$ https://www.hspir.it/en [L] I am using vBulletin 5.5.1. |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|