2012-03-08 71 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

相关问题