2012-05-13 67 views

回答

4

Lighttpd的內部mod_rewrite和mod_redirect只能處理模式匹配和替換,他們無法做字符翻譯。

你可以有它匹配任何大寫字符和URL傳遞到腳本,並重寫,並返回一個重定向

lighttpd.conf模式:

url.rewrite-once += ("(.*[A-Z].*)" => "lower.php?url=$1") 

lower.php :

<?php header("Location: " + strtolower($_GET['url']));