June 18, 201016 yr RewriteRule ^$ /en/hotel/ [R,L] #redirects / to /en/hotel/ RewriteRule ^([a-z]{2})/([^/\.]+)/$ /index.php?lang=$1&page=$2 [L] #rewrites URLs like /en/pagename/ So far so good, when pointing to www.hotelteti.com you'll see www.hotelteti.com/en/hotel/ and the server will use the page at /index.php?lang=en&page=hotel Now the one that causes the "conflict": RewriteCond %{HTTP_HOST} ^hotelteti\.com$ [NC] RewriteRule ^(.*)$ http://www.hotelteti.com/$1 [R=301,L] #it redirects the no-www to the www version of the website. It works, but when pointing to http://hotelteti.com'>http://hotelteti.com, you'll see www.hotelteti.com/index.php?lang=en&page=hotel in the bar, not www.hotelteti.com/en/hotel/ Try it yourself: http://www.hotelteti.com (works as it should) http://hotelteti.com (displays the ugly URL)
June 20, 201016 yr Try putting the conflicting rewrite code at the top of the htaccess to process it first
July 23, 201016 yr I just found this topic as i was having the exact same issues. Adding "../" to everything did the job perfectly! Thanks
Create an account or sign in to comment