문제

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.

도움이 되었습니까?

해결책

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top