Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
阻止对任何机器人对 https:// 页面的所有访问的语法是什么?我有一个旧网站,现在没有 SSL,我想阻止对所有 https:// 页面的访问
我不知道它是否有效,如果机器人robots.txt对不同的协议使用/请求不同。robots.txt但是您可以通过 HTTPS 为请求提供不同的请求。
robots.txt
因此,当http://example.com/robots.txt被要求时,您交付正常的robots.txt. 当https://example.com/robots.txt被要求时,你提供robots.txt不允许一切的东西。
http://example.com/robots.txt
https://example.com/robots.txt