Question

I am facing 1 problem on my live site.

I am working on the Drupal 6 and its a multilingual site. I have URL like : www.sitename.com/fr and www.sitename.com this two URL for both the languages.

Now when some one write www.sitename.com/fr/ in the address bar of browser it will redirect to the same www.sitename.com/fr/ instead of www.sitename.com/fr.

As we all know this affect a lot for ranking of the site.

Please help me.

Was it helpful?

Solution

Place this rule to remove trailing slash before all other rules in your root .htaccess:

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)/$ $1 [R=301,L]
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top