简体   繁体   中英

mod_rewrite migration from apache to lighttpd

how to describe the same thing with lighttpd?

my .htaccess:

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

Not tested:

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"
    )

}

More info here

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM