문제

I am using the following to remove the trailing slash:

 <VirtualHost *:80>


RewriteEngine On
RewriteRule ^(.*)/$ $1 [R=301,L]


</VirtualHost>

However, whenever I access my homepage (e.g. http://www.example.com/) I get a redirect loop

도움이 되었습니까?

해결책

 <VirtualHost *:80>


RewriteEngine On
RewriteRule ^(.+)/$ $1 [R=301,L]


</VirtualHost>

Use + instead of *

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