我把“htaccess”档案放在我的手稿中,内容如下:
RewriteBase /
RewriteCond %{HTTP_USER_AGENT} ^.*(Googlebot|Googlebot|Mediapartners|Adsbot|Feedfetcher)-?(Google|Image)? [NC]
RewriteRule .* /var/www/503.html
这个网站的维护方式是维持的,我不想把任何指数化。 我用火ox用户-应急开关器粉碎机测试了该代码,并查看了该编码在每张日志末显示的接入记录,但是在TamperData或Pabug看到,它仍然收到200台服务器的回复,而不是503台。 我做了什么错误?
"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"
页: 1
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html>
<head>
<title>503 - Service temporary unavailable</title>
</head>
<body>
<h1>503 - Service temporary unavailable</h1>
<p>Sorry, this website is currently down for maintainance please
retry later</p>
</body>
</html>
:::EDIT::: Added small snippet from the rewrite.log Here is a small sample, I went thru the entire log, and everything is referring to a javascript or image file:
172.16.173.26 - - [15/Jun/2010:15:03:31 --0500] [qa-test.com/sid#2b6c1c8ba938][rid#2b6c24cfdd18/initial] (4) [perdir /var/www/qa-test.com/web/] RewriteCond: input= pattern= ^.*(Googlebot|Googlebot|Mediapartners|Adsbot|Feedfetcher)-?(Google|Image)? [NC] => not-matched