2012-04-12 32 views
0

我嘗試下面的代碼在.htaccess與Joomla網站,但它不工作:的index.php 301重定向不工作的Joomla網站

Redirect 301 /index.php/

我也試過:

Redirect 301 www.domain.com/index.php www.domain.com/ 

基本上我不想有重複的頁面,目前我可以通過index.php查看主頁並且沒有。

我不知道爲什麼Joomla這樣做,但它根本不工作。我也做過Artio SEO組件下的301重定向,但它也不起作用。

回答

2

試試這個:

<IfModule mod_rewrite.c> 
    RewriteEngine on 

    RewriteCond %{THE_REQUEST} ^.*/index.php 
    RewriteRule ^(.*)index.php$ "http\:\/\/www\.yourdomain\.com\/$1" [R=301,L] 
</IfModule> 
+0

大。這是工作謝謝你。我們知道爲什麼Redirect 301不起作用嗎? – 2012-04-12 15:40:27