I am using the following code to do a 301 redirect in my controller:
headers[“Status”] = “301 Moved Permanently”
redirect_to “/somepage” and return
I am using nginx in front of mongrel cluster.
When I tested the URL at http://checkmyheaders.com/, it returns the
following info:
HTTP/1.1 302 Moved Temporarily
Server: nginx/0.7.59
Date: Mon, 27 Jul 2009 11:42:17 GMT
Content-Type: text/html; charset=utf-8
Connection: keep-alive
Set-Cookie:
Status: 302
…
What gives?? Is mongrel or nginx changing this to a 302 somewhere along
the way??