我有以下的Apache重写规则如何将此Apache Rewrite规则转换为Tuckey UrlRewriteFilter规则?
<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>