0

在過去的幾個月中,googleBot一直打到我的網站[index.php]上不再存在的文件,因爲所有正確語言的正確主頁的路由都是通過htaccess中的Apache重寫規則處理的。當我的根重定向到[/ en/home]時,爲什麼GoogleBot對[index.php]感興趣?

答到,我註釋掉我的.htaccess中的DirectoryIndex index.php規則

RewriteEngine on 
RewriteBase/
Options +FollowSymLinks -Indexes -ExecCGI 
# DirectoryIndex index.php (not needed anymore, index.php doesnt exist) 
# DirectoryIndex /en/home  (should it be set to this now??) 

目前,一切工作的崇高:在http://website.org根經301永久rediret立即重定向到/en/home

66.249.67.142/== crawl-66-249-67-142.googlebot.com再次打我的網站,並試圖再次閱讀的index.php,它不存在。我該怎麼辦??

一睹爲與這樣的條目無盡的錯誤日誌文件(Googlebot的窮我想這可能是更聰明的...)

[Fri Mar 04 20:48:30 2011] [error] [client 66.249.66.177] File does not exist: 
/var/www/vhosts/site.com/httpdocs/index.php 

[Fri Mar 04 20:58:59 2011] [error] [client 66.249.66.177] File does not exist: 
/var/www/vhosts/site.com/httpdocs/index.php 

[Fri Mar 04 21:00:18 2011] [error] [client 66.249.67.142] File does not exist: 
/var/www/vhosts/site.com/httpdocs/index.php 

[Fri Mar 04 21:01:05 2011] [error] [client 66.249.66.177] File does not exist: 
/var/www/vhosts/site.com/httpdocs/index.php 

[Fri Mar 04 21:12:28 2011] [error] [client 66.249.66.164] File does not exist: 
/var/www/vhosts/site.com/httpdocs/index.php 

[Fri Mar 04 21:27:30 2011] [error] [client 66.249.68.115] File does not exist: 
/var/www/vhosts/site.com/httpdocs/index.php 

回答

1

有人鏈接到的index.php,所以谷歌正試圖跟隨它。

做一個從index.php到/ en/home的重寫,你會變成金色的。 E:

E:另外,DirectoryIndex不能是Path,AFAIK。它只是告訴服務器如果沒有另外指定,應該提供一個目錄中的哪個文件。

+0

多數民衆贊成在DirectoryIndex路徑的關鍵細節.....謝謝! – Sam 2011-03-05 01:36:55

1

//index.php是任何通過HTTP訪問您的網站的單獨資源。僅僅因爲你正在重定向/,如果Google以前看到過/index.php的鏈接,那麼這並不意味着什麼。

只需將/index.php重新定向至/en/home即可,方法與您重定向/相同。