我需要将所有url重写为小写但我无法访问httpd.conf来添加RewriteMap。有没有办法在没有RewriteMap的情况下将.htaccess重写为小写?我尝试过的下面的当前代码是产生内部错误/ 500
#RewriteEngine On
#RewriteMap lowercase int:tolower
#RewriteCond $1 [A-Z]
#RewriteRule ^/(.*)$ /${lowercase:$1} [R=303,L]
RewriteEngine On
RewriteMap lc int:tolower
RewriteCond %{REQUEST_URI} [A-Z]
RewriteRule (.*) ${lc:$1} [R=301,L]
答案 0 :(得分:0)
这对我有用。
Options +FollowSymlinks
RewriteEngine On
CheckSpelling On
CheckCaseOnly On