Modrewrite到lighttpd [英] Modrewrite to lighttpd
本文介绍了Modrewrite到lighttpd的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有以下的.htaccess:
I've the following .htaccess:
RewriteEngine On
RewriteRule ^([^/]*)\.html /$1.php
RewriteRule ^scss/([^/]*)\.css$ /showcss.php?css=$1 [L]
我怎么能转换到lighttpd?
how can I convert it to lighttpd?
推荐答案
查看lighttpd的教程迁移来自Apache 。没有重写规则,从阿帕奇到lighttpd一个不错的1对1的映射,但这些应该是pretty的简单。看看这对你的作品(可能需要少量的正则表达式的调整):
See the lighttpd tutorial for Migrating from Apache. There isn't a nice 1-to-1 mapping of rewrite rules from apache to lighttpd, but those should be pretty straightforward. See if this works for you (may require a little regex tweaking):
url.rewrite-once = ( "^/([^/]*)\.html" => "/$1.php",
"^/scss/([^/]*)\.css$" => "/showcss.php?css=$1")
这篇关于Modrewrite到lighttpd的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文