2012-08-01 73 views
0

我htaccess的樣本:lighttpd的mod_rewrite的URL

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

回答

2

試試這個:url.rewrite-once = ("^login$" => "index.php")

+0

沒有奏效。 – Mezzan 2012-08-01 06:49:34

+0

@ Mezzan你重新開始輕盈嗎?因爲重寫對我來說似乎沒問題。 – j0k 2012-08-01 07:22:09

+0

@ j0k我的問題重新啓動lighty:無法加載插件mod_fastcgi不止一次,請修復您的配置(我們可能不會接受此類配置在未來的版本中也無法加載插件mod_auth – Mezzan 2012-08-01 07:45:38