我的htaccess样本:
Options +FollowSymlinks
RewriteEngine on
RewriteRule ^login$ index.php
ErrorDocument 500 /login
当我尝试使用url.rewrite时:
url.rewrite = ("^login$" => "index.php")
失败了。这里有什么遗漏?
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" )
答案 0 :(得分:2)
试试这个:url.rewrite-once = ( "^login$" => "index.php" )