503 server response for Googlebot

Posted by Hallik on Stack Overflow See other posts from Stack Overflow or by Hallik
Published on 2010-06-15T17:56:01Z Indexed on 2010/06/15 19:22 UTC
Read the original article Hit count: 251

Filed under:
|

I put an .htaccess file in my webroot with the following contents

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

This website is in maintenance mode, and I don't want anything indexed yet. I tested the code with a firefox User-Agent switcher plugin, and looking at the access log it shows this at the end of each log entry, but watching in TamperData or Firebug, it still returns a 200 server response instead of a 503. What am I doing wrong?

"Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)"

contents of /var/www/503.html

<!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>

I get this in my error log. LogLevel debug, would that go into the vhost in a specific place? Every answer I see on google is something different.

Request exceeded the limit of 10 internal redirects due to probable configuration error. Use 'LimitInternalRecursion' to increase the limit if necessary. Use 'LogLevel debug' to get a backtrace.

© Stack Overflow or respective owner

Related posts about apache

Related posts about mod-rewrite