2013-10-23 128 views
0

我需要重寫所有可能的請求到服務器Lighttpd的完整URL重寫路徑

實例的路徑:如果我進入https://wwww.myhost.com/#hi=random+text+1?stop=now

我需要一個重定向到:

http://myhost.com/ 

這可能與url.rewrite

感謝

回答

0

你到底想達到什麼目的?你想隱藏網址,以便它始終顯示http://myhost.com。如果你有多個頁面,我相信這是不可能的。

您是否嘗試一切重定向到例如index.php的

 
    RewriteEngine on 
    RewriteBase/
    RewriteCond %{REQUEST_FILENAME} !-f 
    RewriteCond %{REQUEST_FILENAME} !-d 
    RewriteRule ^(.*)$ index.php?anything=$1 [QSA,L] 

這種方式,例如http://myhost.com/example/將像請求處理被http://myhost.com/index.php?anything=example