mod_rewrite从apache迁移到lighttpd

时间:2013-03-25 19:36:17

标签: apache mod-rewrite rewrite lighttpd

如何用lighttpd描述同样的事情?

我的.htaccess:

RewriteEngine On
RewriteBase /
RewriteCond $1 !^(index\.php|style\.css|image|image-small|robots\.txt|sitemap\.xml|favicon\.ico)
RewriteRule ^(.*) index.php [L]

1 个答案:

答案 0 :(得分:0)

未经测试:

server.modules = (
    "mod_rewrite"
)

$HTTP["host"] == "web.com" {

    server.document-root = "/var/www/web.com/public_html/"

    url.rewrite-once = ( 
      "^(?!index\.php|style\.css|image|image-small|robots\.txt|sitemap\.xml|favicon\.ico)" => "$0"
      "^(.*)" => "index.php"
    )

}

更多信息here