Вопрос

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.

Это было полезно?

Решение

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

RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+?)/$ $1 [R=301,L]
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top