문제

I have an url http://example.com/xyz/, and i want this url as http://example.com/xyz xyz is only for example it could be anything. Please help me. your help would be appreciated. Thank you in advance.

도움이 되었습니까?

해결책

To remove trailing slash you can use this rule as your first rule:

RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{THE_REQUEST} \s(.+?)/+[?\s]
RewriteRule ^(.+?)/$ /$1 [R=301,L]
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top