Modrewrite到lighttpd

时间:2011-11-22 19:41:05

标签: .htaccess mod-rewrite lighttpd

我有以下内容.htaccess:

RewriteEngine On
RewriteRule ^([^/]*)\.html /$1.php
RewriteRule ^scss/([^/]*)\.css$ /showcss.php?css=$1 [L]

如何将其转换为lighttpd?

1 个答案:

答案 0 :(得分:0)

请参阅Migrating from Apache的lighttpd教程。从apache到lighttpd的重写规则没有很好的一对一映射,但那些应该非常简单。看看这是否适合你(可能需要一点regex调整):

url.rewrite-once = ( "^/([^/]*)\.html" => "/$1.php", 
                     "^/scss/([^/]*)\.css$" => "/showcss.php?css=$1")