我有以下的Apache Rewrite规则。
我希望将其移植到tuckey.org的URL Rewrite Filter中。请问有哪些等效规则可以使URL变为小写?我特别关注如何组成条件元素。
以下是我的第一条规则,但即使没有条件,它也不起作用:
<IfModule rewrite_module>
RewriteEngine on
RewriteMap tolowercase int:tolower
RewriteCond $2 [A-Z]
RewriteRule ^(.*)/(.*).html$ $1/${tolowercase:$2}.html [R=301,L]
</IfModule>
将其更改为:
http://localhost.localdomain.com/FooBarBaz.html
转换为:
http://localhost.localdomain.com/foobarbaz.html
我希望将其移植到tuckey.org的URL Rewrite Filter中。请问有哪些等效规则可以使URL变为小写?我特别关注如何组成条件元素。
以下是我的第一条规则,但即使没有条件,它也不起作用:
<rule>
<name>Force URL filenames to lower case</name>
<from>^(.*)/(.*).html$</from>
<to type="permanent-redirect" last="true">$1/${lower:$2}.html</to>
</rule>