Forum Moderators: phranque
If I call the page directly I stil get multiple 200's
This is my complete .htaccess
etEnvIfNoCase Host example\.com block_access
Order Deny,Allow
Deny from env=block_access
## MY IP
Allow from 00.00.000.000
Options All -Indexes -IncludesNOEXEC
AddHandler application/x-httpd-php .html
ErrorDocument 404 /404.html
ErrorDocument 403 /403.html
RewriteEngine on
## FORCE REDIRECT TO MAINTENANCE PAGE
#RewriteCond %{TIME_YEAR}%{TIME_MON}%{TIME_DAY}%{TIME_HOUR}%{TIME_MIN} >200902010653
RewriteCond %{REQUEST_URI} !^/maintenance\.html$
#RewriteCond %{REMOTE_ADDR} !^00\.00\.000\.000$
RewriteRule (.*) http://www.example.com/maintenance.html [R=302,L]
Shouldn't I only be getting one 200 status code?
If so, can anyone see where my mistake is?
Thanks
Ray...
A couple of questions:
Do you mean that you see four separate HTTP client request/server response transactions, with a response code of 302, 200, 200, and 200 in that order? Or do you mean that while watching the HTTP transactions you see an intial client request, a server response of 302-Found, a second client request for that new URL, and then a server response with three 200-OK status lines in it? Or some combination or permutation of this?
Frankly, it sounds like a scripting error, since the basic server isn't going to issue multiple status headers or multiple response to the same request...
Jim
I am using Live HTTPheaders to see the response and I see four separate HTTP client request/server responses, with a response code of 302, 200, 200, and 200 in that order.
The problem can't come from the /maintenance page because it's only HTML.
---START---
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Maintenance Page</title>
</head>
<body>
<h1>Maintenance Page</h1>
</body>
</html>
---END---
I removed everything else from the .htaccess because I thought that something else could be interfering but no change.
When I disable the redirect I get the correct single 200 server response.
-ADDED-
I have been experimenting and I have been using the firefox webdeveloper toolbar with cache disabled. I re-enabled cache and I get a single 200 response now.
<SheepishGrin>Sorry to waste your time, I do appreciate your help though </SheepishGrin>.
Ray...