2011-07-01 24 views
0

我目前有它設置爲重定向www.foo.***/2www.foo.***/index.php?id=2,但我試圖讓它重定向而不顯示的URL。htaccess刪除GET參數,但仍然通過價值

我想要的網址留下來爲www.foo.***/2但atually提供www.foo.***/index.php?id=2

我htaccess文件:

Options +FollowSymlinks 
RewriteEngine ON 
RewriteRule ^$ h**p://server/~user/folder/sub/index.php [L] 
ErrorDocument 404 h**p://server/~user/folder/sub/ERROR/ 
ErrorDocument 500 h**p://server/~user/folder/sub/SERVER/ 
RewriteRule ^(error)/([0-9A-Za-z+]+)?$ h**p://server/~user/folder/sub/index.php?action=ERROR [L,NC] 
RewriteRule ^(server)/([0-9A-Za-z+]+)?$ h**p://server/~user/folder/sub/index.php?action=SERVER [L,NC] 
RewriteRule ^([0-9A-Za-z+]+)?$ h**p://server/~user/folder/sub/index.php?id=$1 [L,NC] 

任何幫助將是巨大的感謝!

博huttinger

感謝真棒spamz protectionz,我替代內容的信件星在後

+0

** UGH **其「同域」問題。即使重定向到同一臺服務器,它也有http,並通過顯示外部重定向來做正確的事情! – roberthuttinger

+0

那麼......目前的狀態是什麼 - 它解決了還是需要幫助? - 我不清楚 – LazyOne

+0

它解決了!謝謝! – roberthuttinger

回答

1

這是一個「同一個域」的問題。如果調用在同一臺服務器上的某個位置,它不會重寫URL在酒吧

解決方案:而不是使用:

h**p://server/~user/folder/sub/index.php?id=$1 [L,NC] 

使用本:

/home/~user/folder/sub/index.php?id=$1 [L,NC] 

希望這有助於!

相關問題