Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In the following log snippet what could cause certain requests to return a 302 status and the last one to return a 200 status? As I understand it 302 means "The requested resource resides temporarily under a different URI" but why would this be? I would expect the response code to be 200, as in the last line of the log example, for every request.

Also wondering about the HTTP/1.0 versus 1.1 but I think I know that one so... really, just why the 302 versus 200 status codes for the same resource (that has not moved)? - - [09/Feb/2011:14:13:23 -0800] "GET /report/now HTTP/1.0" 302 20 "" - - [09/Feb/2011:14:13:28 -0800] "GET /report/now HTTP/1.0" 302 20 "" - - [09/Feb/2011:14:13:41 -0800] "GET /report/now HTTP/1.0" 302 20 ""
208.319.74.24 - - [09/Feb/2011:14:13:56 -0800] "GET /report/now HTTP/1.1" 200 355 "" 
share|improve this question
up vote 2 down vote accepted

An application could force Apache to return 302 to send back a 'Location:' header to the client browser.

For instance, in php if you write the following code:

<?php if ([condition]) header('Location:'); ?>

if [condition] is evaluated to true, Apache will return 302 error instead of 200 if [condition] is evaluated to false.


share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.