如何在不使用的情况下制定相同的重写规则THE_REQUEST
?
RewriteEngine On
# Rewrite multiple slashes with single slash after domain
RewriteCond %{THE_REQUEST} ^[A-Z]+\s//+(.*)\sHTTP/[0-9.]+$ [OR]
RewriteCond %{THE_REQUEST} ^[A-Z]+\s(.*/)/+\sHTTP/[0-9.]+$
RewriteRule .* http://%{HTTP_HOST}/%1 [R=301,L,NE]
更新:
.htaccess 位置 - www.domain.com/url/.htaceess
重写操作 - www.domain.com//url/id 重写为 www.domain.com/url/id