新闻中心

Zen Cart如何正确的书写Robots文件

作者 / 无忧主机 时间 2015-11-18 17:41:42

在之前的文档中无忧主机小编已讲到过,重复的内容的页面如果被搜索引擎收录会有被惩罚的后果。允许搜索蜘蛛机器人在不采用会跟踪其在网站上浏览路径的会话 ID 或参数的情况下抓取您的网站。这些技术对跟踪单个用户的行为非常有用,但蜘蛛机器人的访问模式却完全不同。”比如zencart程序产生的 index.php?main_page=site_map与index.php?main_page=site_map& language=gb内容完全一致,导致重复页面的产生,显然会降低整个网站在搜索引擎算法评估中得出的质量。Zen Cart实现伪静态后,动态依然存在,这样很容易造成了搜索引擎抓取了很多重复页面,接下来我们可以利用robots.txt文件来屏蔽蜘蛛抓取这些重复的页面。 Zen Cart如何正确的书写Robots文件步骤如下: 1、在php空间根目录新建一个robots.txt 2、在文件中输入如下代码:

User-agent: *
Disallow: /cgi-bin/
Disallow: /images/
Disallow: /cache/
Disallow: /docs/
Disallow: /extras/
Disallow: /tempEP/
Disallow: /*?
Disallow: /*?zenid*
Disallow: /*alpha_filter_id*
Disallow: /*?language
Disallow: /*cPath
Disallow: /privacy.html
Disallow: /gv_faq.html
Disallow: /discount_coupon.html
Disallow: /unsubscribe.html
Disallow: /conditions.html
Disallow: /popup_image_additional.html
Disallow: /tell_a_friend.html
Disallow: /product_reviews_write.html
Disallow: /pages-popup_image.html?
Disallow: /popup_image_additional.html?
Disallow: /index.php?main_page=create_account
Disallow: /index.php?main_page=shippinginfo
Disallow: /index.php?main_page=privacy
Disallow: /index.php?main_page=conditions
Disallow: /index.php?main_page=unsubscribe
Disallow: /index.php?main_page=login
Disallow: /index.php?main_page=product_reviews_write
Disallow: /index.php?main_page=featured_products
Disallow: /index.php?main_page=products_new
Disallow: /index.php?main_page=popup_image
Disallow: /index.php?main_page=product_info&cPath
Disallow: /index.php?main_page=product_info&products_id
Disallow: /index.php?main_page=tell_a_friend
3、保存文件之后,将robots.txt文件上传至php主机网站根目录即可。 无忧主机相关文章推荐阅读: ZENCART清理重复网址与页面的方法 ZEN CART根据用户搜索的关键词来定义为TITLE ZEN CART如何将后台订单显示图片以及产品链接

本文地址:https://www.51php.com/zencart/20748.html

1
1
1
1
1
1
1

客户服务热线

0791-8623-3537

在线客服