2012-03-08 48 views
0

我想這重定向頁面/index.php?route=common/home到index.html的htaccess的重定向的index.php?V = 1到index.html的

,並把這個在我的.htaccess頁:?

重定向301的index.php路線=普通/ index.html的家

不過,我得到一個500內部服務器錯誤當我這樣做。

有誰知道如何正確地做到這一點?

(注:還有其他的網頁例如/index.php?route=checkout我不想重定向)

任何幫助將不勝感激。

謝謝

回答

0

Redirect只是真正用來做別名(並且是mod_alias一部分)。相反,你需要使用mod_rewrite,所以RewriteRule /index.php?route=common/home index.html [R=301]應該工作,但首先檢查它。

+0

感謝您的快速回復。所以我將代碼更改爲: RewriteEngine on RewriteRule /index.php?route=common/home index.html [R = 301] 但仍然無法正常工作。 有沒有其他想法? – 2012-03-08 23:46:27

+0

您還需要'RewriteEngine On'在某處。如果這不起作用,我不太確定,因爲我不能100%記得mod_rewrite語法,也許刪除前導斜槓。 – slugonamission 2012-03-09 10:34:32

相關問題