Project

General

Profile

Actions

Feature #670

closed

mod_redirect uses 301. Should be 302.

Added by Anonymous over 18 years ago. Updated over 16 years ago.

Status:
Fixed
Priority:
Normal
Category:
mod_redirect
Target version:
-
ASK QUESTIONS IN Forums:

Description

301 means permanently moved, which means the user agent is supposed to forget about the orignal URL and switch to the new one. 302 means found, but go to this URI instead, "for now" (i.e. temporarily).

Despite whether browsers behave like this or not, 302 is more acceptable under HTTP, and does not preclude the server's master from changing a redirect in the future.

mod_redirect.c: line 247

con->http_status = 301;

should be:

con->http_status = 302;

Thanks,
Steve

Actions #1

Updated by lfe about 18 years ago

I agree, 302 is probably a better pick.
Also - Apache's Redirect defaults to 302.

Adding a http status code flag/option wouldn't hurt either.

Actions #2

Updated by Anonymous about 18 years ago

The option to choose 301 or 302 redirects would be preferred. Using 301 redirects is more search engine friendly and preferred in many cases.

-- dnspark

Actions #3

Updated by Anonymous almost 17 years ago

Different situations require different status codes. For normal use, leaving the 302 code is fine, but for one particular application I've had to edit the source and recompile Lighttpd with the con->http_status = 302.

I would like to see both options, perhaps something like redirect-temp or redirect-found would be appropriate?

url.redirect-temp = (
".*" => "http://www.%1"
)

-- angelo

Actions #4

Updated by stbuehler over 16 years ago

  • Status changed from New to Fixed
  • Resolution set to duplicate

See #1475 for further discussion.

Actions

Also available in: Atom