2012-10-16 22 views
0

幫助重寫flag apache - lighttpd的QSA。 現在可供選擇:重寫lighthttpd QSA

RewriteRule ^([^?]*) index.php?_route_=$1 [L, QSA] 

審理此案,但運行不正常:

url.rewrite-if-not-file = ("^/(?:\?(.*))?" => "/index.php?_route_=$1") 
+0

不能正常工作怎麼樣?它在做什麼? – Jon

回答

1

從我瞭解的lighttpd的:

url.rewrite-if-not-file = ("^/([^\?]*)$" => "/index.php?_route_=$1") 

..應該工作。如果不是,那麼以下將會:

url.rewrite-if-not-file = ("^([^\?]*)$" => "/index.php?_route_=$1") 
+0

此版本不起作用。如果URL出現在問號中,我會得到一個404頁面 – jeka5555

+0

'^([^ \?] +)[\?] {0,1}(。*)$'和$ 1與文件有關,即'index.php'和$ 2將涉及到查詢,即'index.php?myvar = test'它將匹配'myvar = test'部分。 – Jon

+0

(我假設你已經試過'^(。*)$'來匹配所有輸入的內容......) – Jon