English 中文(简体)
页: 1
原标题:503 server response for Googlebot

我把“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
最佳回答

你有无限的 lo。 你的演唱成果正在重新撰写。

RewriteBase /
RewriteCond %{HTTP_USER_AGENT} (?:Googlebot|Googlebot|Mediapartners|Adsbot|Feedfetcher)-?(?:Google|Image)? [NC]
RewriteCond $0 !(?:^|/)503.html$
RewriteRule .* /var/www/503.html [R=503]

如@BalusC所指出,你还需要<代码>R。

问题回答

两种用途:

RewriteRule .* /var/www/503.html [R=503,L]

或者,如果你在Pharma 2.x上重新找回上述建筑,那么该建筑就成为503.php。 页: 1

header("HTTP/1.1 503 Service Temporarily Unavailable"); 




相关问题
Using SimplePie with CodeIgniter and XAMPP

I am using CodeIgniter 1.7.2 with XAMPP 1.7.2 on a Windows computer. I am trying to make use of SimplePie. I followed all the instructions I could find: a copy of simplepie.inc is in my applications/...

Multiple Sites with common files

I have developed over 50 sites that all use the exact same files other than CSS and IMAGES, I currently duplicate the files each time I create a new site and upload different css and images. What ...

http server validation

I finish a litle http server, writing from scratch. I would like to be sure that my imlementation is conforme to the HTTP specifications. W3C give us tools for HTML/XML conformance, but i see nothing ...

热门标签