【发布时间】:2011-04-17 03:44:26
【问题描述】:
自从我添加了一个 .htaccess 文件后,我在使用这个网站时遇到了问题。 Google bot 不会抓取新链接。
这是我的 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>
感谢您的帮助
【问题讨论】:
-
不是答案,但您的 robots.txt 未配置,因为没有
allow只有disallow。所以你的语法应该是:disallow:(后面没有任何内容)。此外,您可以在 robots.txt 中引用您的 XML 站点地图以获得更多曝光。 -
即使 Allow 不在基本 robots.txt 规范中,Allow 仍然是常用的(并且被 google 理解),即:google.com/robots.txt 所以这不是问题
-
嗨,可能只是 .htaccess 重定向不起作用,请参阅:grantsimeonphoto.com/index.php?page=services HTTP 200 ,grantsimeonphoto.com/accueil HTTP 404 ...所以谷歌不会索引新页面,因为它们是 HTTP 404。
标签: .htaccess seo web-crawler