c0427
V2EX  ›  问与答

robots.txt 书写疑问

  •  
  •   c0427 · Jan 31, 2016 · 1551 views
    This topic created in 3839 days ago, the information mentioned may be changed or developed.
    目前内容页面的首页为 www.xxx.com/t*.html ,翻页后为 www.xxx.com/t*-#.html (* 为 ID ,# 为页码)。我想要搜索引擎只收录内容页面的首页,而不收录第二页和第三页,那么我在 robots.txt 里写下了如下的规则,请问正确吗?否则应该如何书写?谢谢。

    Disallow: /t-*.html
    Allow: /t*.html
    1 replies    2016-01-31 10:57:41 +08:00
    c0427
        1
    c0427  
    OP
       Jan 31, 2016
    已使用谷歌 robots.txt 测试工具解决。
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3116 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 29ms · UTC 12:43 · PVG 20:43 · LAX 05:43 · JFK 08:43
    ♥ Do have faith in what you're doing.