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.

Était-ce utile?

La 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]
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top