【发布时间】:2013-12-11 06:39:41
【问题描述】:
显然,Bingbot 在我的网站上陷入了无限循环。它下载像 http://www.htmlcodetutorial.com/quicklist.html/applets/applets/applets/applets/applets/applets/applets/applets/applets/applets/applets/applets/applets/applets/sounds/forms/linking/frames/document/linking/images/_AREA_onMouseOver.html 这样的页面。由于我将服务器设置为将 .html 解释为 PHP,因此该页面只是 http://www.htmlcodetutorial.com/quicklist.html 的副本。 如何阻止 Bingbot 寻找这些伪造的副本?
为什么 Bingbot 开始寻找这些页面?
我想做如下所示的 .htaccess 文件的最后一行(如“Redirect to Apache built-in 404 page with mod_rewrite?”),但当我尝试RewriteRule ^.*\.html\/.*$ - [R=404] 时,整个网站显示 500 错误。
即使我使用下面的最后一行,它也会重定向到 http://www.htmlcodetutorial.com/home/htmlcode/public_html/help.html,这不是我想要的。
AddType application/x-httpd-php .php .html
RewriteEngine on
Options +FollowSymlinks
RewriteRule ^help\/.* help.html [L]
RewriteCond %{HTTP_HOST} ^example.com
RewriteRule (.*) http://www.htmlcodetutorial.com/$1 [R=301,L]
ErrorDocument 404 /404.html
RewriteRule ^.*\.html\/.*$ help.html [R=301]
附:我知道这个网站已经过时了。
【问题讨论】:
标签: .htaccess http-status-code-404 bingbot