简体   繁体   中英

lighttpd mod_rewrite url

My htaccess sample:

Options +FollowSymlinks
RewriteEngine on
RewriteRule ^login$ index.php
ErrorDocument 500 /login

When i tried with url.rewrite:

url.rewrite = ("^login$" => "index.php")

It failed. Anything missing here?

lighttpd.conf:

server.modules = (
"mod_access",
"mod_alias",
"mod_compress",
"mod_redirect",
   "mod_rewrite",
    "mod_scgi",
)

url.access-deny             = ( "~", ".inc" )
url.rewrite-once = ( "^login$" => "index.php" )

static-file.exclude-extensions = ( ".php", ".pl", ".fcgi" )

试试这个: url.rewrite-once = ( "^login$" => "index.php" )

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