假设我有一个网站http://example.com http://example.com。我真的很想让机器人看到主页,但任何其他页面都需要被阻止,因为它对蜘蛛来说毫无意义。换句话说
http://example.com http://example.com & http://example.com/ http://example.com/应该被允许,但是http://example.com/anything http://example.com/anything and http://example.com/someendpoint.aspx http://example.com/someendpoint.aspx应该被阻止。
此外,如果我可以允许某些查询字符串传递到主页,那就太好了:http://example.com?okparam=true http://example.com?okparam=true
but not
http://example.com?anythingbutokparam=true http://example.com?anythingbutokparam=true
经过一番研究,我发现了一个被主要搜索提供商接受的解决方案:google http://www.google.com/support/webmasters/bin/answer.py?answer=40367 , yahoo http://help.yahoo.com/l/us/yahoo/search/webcrawler/slurp-02.html& msn(我可以在这里找到验证器):
User-Agent: *
Disallow: /*
Allow: /?okparam=
Allow: /$
技巧是使用 $ 来标记 URL 的结尾。
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)