如何禁止我的
robots.txt
中的所有动态页面?
例如
page.php?hello=there
page.php?hello=everyone
page.php?thank=you
我希望
page.php
并且禁止所有可能的动态版本。
目前我有
User-Agent: *
Disallow: /page.php
但这仍然允许例如
page.php?hello=there
您已经拥有的内容应该阻止所有尊重 robots.txt 的搜索引擎对 /page.php 的所有访问(无论是否提供任何查询字符串参数)
不要忘记 robots.txt 仅适用于机器人 :-) 如果您尝试阻止用户访问该页面,您需要使用 .htaccess 或类似文件