我需要在小写规则中排除管理员网址(index.php / admin /)
对于小写网址,我使用下一个规则
RewriteMap lc int:tolower
RewriteCond $1 [A-Z]
RewriteRule ^/?(.*)$ /${lc:$1} [R=301,L]
谢谢!
答案 0 :(得分:0)
尝试这样,
RewriteMap lc int:tolower
RewriteCond %{REQUEST_URI} !^/index.php/admin(.*) [OR]
RewriteCond $1 [A-Z]
RewriteRule ^/?(.*)$ /${lc:$1} [R=301]
注意:我暂时没试过。
答案 1 :(得分:0)
RewriteCond %{REQUEST_URI} !^/index.php/admin(.*) [NC]
RewriteCond $1 [A-Z]
RewriteRule ^/?(.*)$ /${lc:$1} [R=301,L]