2011-04-17 46 views
0

自從我添加了一個.htaccess文件後,我遇到了這個網站的問題。谷歌機器人不抓取新的鏈接。.htaccess和谷歌爬蟲錯誤

這裏是我的htaccess:

Options +FollowSymlinks 
RewriteEngine On 

RewriteCond %{HTTP_HOST} !^www.grantsimeonphoto.com$ 
RewriteRule ^(.*)$ http://www.grantsimeonphoto.com/$1 [R=301] 

RewriteRule ^accueil$  index.php?page=accueil 
RewriteRule ^services$ index.php?page=services 
RewriteRule ^portfolio$ index.php?page=portfolio 
RewriteRule ^contact$  index.php?page=contact 
RewriteRule ^epreuves$ index.php?page=epreuves 

,如果你做對谷歌搜索,你會看到:

site:grantsimeonphoto.com 

here is my robot.txt: 
User-agent: * 
Allow:/

這裏是我的sitemap.xml:

<?xml version="1.0" encoding="UTF-8"?> 
<urlset 
     xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" 
     xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
     xsi:schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9 
      http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> 
<!-- created with Free Online Sitemap Generator www.xml-sitemaps.com --> 

<url> 
    <loc>http://www.grantsimeonphoto.com/</loc> 
    <priority>1.00</priority> 
</url> 
<url> 
    <loc>http://www.grantsimeonphoto.com/accueil</loc> 
    <priority>0.80</priority> 
</url> 
<url> 
    <loc>http://www.grantsimeonphoto.com/services</loc> 
    <priority>0.80</priority> 
</url> 
<url> 
    <loc>http://www.grantsimeonphoto.com/portfolio</loc> 
    <priority>0.80</priority> 
</url> 
<url> 
    <loc>http://www.grantsimeonphoto.com/contact</loc> 
    <priority>0.80</priority> 
</url> 
<url> 
    <loc>http://www.grantsimeonphoto.com/epreuves</loc> 
    <priority>0.80</priority> 
</url> 
</urlset> 

感謝幫助

+0

不是答案,但是您的robots.txt沒有配置,因爲沒有'只允許''不允許'。所以你的語法應該是:'不允許:'(沒有任何跟隨它)。另外,您可以在robot.txt中引用您的XML站點地圖以獲得更多曝光。 – 2011-04-17 07:23:02

+0

即使Allow不在基本的robots.txt規範中,Allow仍然是常用的(並且可以通過google瞭解),即:http://www.google.com/robots.txt這樣就不是問題 – 2011-04-20 07:01:45

+0

嗨,可以只是,.htaccess重定向不起作用,請參閱:http://www.grantsimeonphoto.com/index.php?page=services HTTP 200,http://www.grantsimeonphoto.com/accueil HTTP 404 .. 。所以谷歌將不會索引新頁面,因爲它們是HTTP 404。 – 2011-04-20 07:03:33

回答

0

呦你可以嘗試通過Google Webmaster Central重新提交你的站點地圖。

而且您的多個重寫規則應該被合併爲1這樣的:

RewriteRule ^(accueil|services|portfolio|contact|epreuves)$ /index.php?page=$1 [L,NC,QSA,NE] 

同樣重要的是採用L,QSA和NC國旗上述規則。

1

您不需要添加允許,通常所有的搜索引擎都會抓取您的鏈接,當它沒有明確禁止指定的URL。