代码之家  ›  专栏  ›  技术社区  ›  bernie

阻止链接在Opencart中建立索引

  •  0
  • bernie  · 技术社区  · 13 年前

    最近,我似乎收到了很多来自谷歌网站管理员工具的404个错误。有没有办法禁止这些链接被索引?它们是从哪里来的?

    如果你能对这件事有所了解,我将不胜感激。提前谢谢。

    我在露天矿1.5.4.1。

    这是404个错误

    http://mydomain.com/product/search&filter_tag=Purse&sort=rating&order=ASC&limit=25
    http://mydomain.com/product/search&sort=p.price&order=DESC&filter_tag=&limit=25
    http://mydomain.com/cart?qty=1&id_product=323&token=bfcf19e76ed4a88abd8508e8dc097a70&add
    

    我还在robots.txt中包含了以下条目,但没有用

    User-agent: Googlebot
    
    User-agent: *
    Disallow: /cgi-bin
    Disallow: /*?limit
    Disallow: /*&limit
    Disallow: /*?sort
    Disallow: /*&sort
    Disallow: /*?route=checkout
    Disallow: /*?route=account
    Disallow: /*?route=product/search
    Disallow: /*?route=affiliate
    Disallow: /*&keyword
    Disallow: /*?page=1
    
    1 回复  |  直到 13 年前
        1
  •  1
  •   Jay Gilford    13 年前

    这看起来像是你在使用一个扩展,试图将丑陋的url重写为更好/更友好的url——或者曾经是这样。您应该使用.htaccess将坏的URL重写为正确的URL,而不是尽可能地阻塞页面。这将有助于您的网站