21489 Posts in 5783 Topics by 2621 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 988 Views |
-
RewriteRule

8 March 2009 at 5:02am
hi
i want to redirect the site to correct language version
how to modify the .htaccess ?RewriteEngine On
RewriteBase /etravel
RewriteCond %{REQUEST_URI} !(\.gif)|(\.jpg)|(\.png)|(\.css)|(\.js)|(\.php)$
RewriteCond %{REQUEST_URI} ^(.*)$
RewriteCond %{REQUEST_FILENAME} !-fRewriteRule .* sapphire/main.php?url=%1&%{QUERY_STRING} [L]
this doesn't work
RewriteCond %{HTTP:Accept-Language} (pl) [NC]
RewriteRule .* /etravel/wycieczki/ [R,L]RewriteCond %{HTTP:Accept-Language} (en) [NC]
RewriteRule .* /etravel/tours/ [R,L]RewriteCond %{HTTP:Accept-Language} (it) [NC]
RewriteRule .* /etravel/escursione/ [R,L] -
Re: RewriteRule

8 September 2009 at 2:13am
The Accept-Language header usually doesn't consist of a single language string like "en" or "pl".
You could try the following:RewriteCond %{HTTP:Accept-Language} ^pl.*$ [NC]
RewriteRule .* /etravel/wycieczki/ [R=301,L]But beware, every request with "Accept-Language = pl" will be redirected to /etravel/wycieczki/. So that basically limits you to 1 page per language... not sure if it's really that what you want
-
Re: RewriteRule

8 September 2009 at 8:00am Last edited: 8 September 2009 8:12am
but the problem is hmm
the URL has been changed but i get blank page with 301 Error and message:"Moved Permanently
The document has moved here." "here" is a link to new address but it doesnt work
| 988 Views | ||
|
Page:
1
|
Go to Top |


