Question

When I enter my website http://domain.com it redirects to http://www.domain.com// (double slash in the end).

What is strange, I haven't set any redirects in .htaccess file. Actually that file is empty. I've tried to add some rewrite rules there, but the same problem appeared again.

I can't understand where have been set that non-www to www redirect? Do you have any ideas.

Thanks.

Was it helpful?

Solution

Try using this code to remove double slashes from the urls.

RewriteEngine On
RewriteBase /
RewriteCond %{THE_REQUEST} //
RewriteRule ^ $0 [R=302]

Change the 302 to 301 once you get it working.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top