Options +FollowSymLinks -MultiViews
RewriteEngine On
# RewriteCond %{HTTPS} !on
# RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteRule ^favicon.ico images/favicon.ico [L]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php($|\ |\?)
RewriteRule ^ /%1 [R=301,L]
# Redireciona
RewriteCond %{THE_REQUEST} ^[A-Z]{3,}\s([^.]+)\.php [NC]
RewriteRule ^ %1 [R,NC,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_URI} !/$
RewriteRule . %{REQUEST_URI}/ [L,R=301]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(login.php/|login|login/) - [L]
RewriteCond %{REQUEST_FILENAME}.php -f
RewriteRule ^(.*?)/?$ $1.php [L]
这是我的.htaccess文件,我试图不对黑名单文件应用斜杠,正如您所看到的,我正在尝试使用 RewriteRule ^(登录。 php / | login | login /) - [L] 但仍无效。此外,没有错误,只是仍然没有应用黑名单
@edit:我尝试过使用 RewriteRule ^登录([\ w /-] +)(\\。*)?$ $ 1.php $ 2 [L] ,但仍然没有运作:/
我该怎么办? 感谢