Here's a rough overview of what I have:
* main page of the site is a CGI using fastcgi
* this page mostly just issues redirects (302)
for the purposes of discussion, the redirect issued can be
considered random and constantly different (hence need for CGI)
(in actuality, it's deterministic)
* when someone requests a file besides the main page, if it
exists, I want people to reach it
* when someone requests a file that is a 404, I want the main
page CGI to run, so I added to the conf:
error_page 404 /index.cgi;
That all works. But the main page issues a "Status: 302" and a
"Location:" header, yet clients requesting a bad URL never see
a "HTTP/1.1 302 Found" response, instead they get a "HTTP/1.1 404
Not Found" which includes a "Location" header.
So is this something I fix in Nginx? Fastcgi? My CGI script? What's the
trick for converting the 404 to a new status?
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 293 |
Nodes: | 16 (2 / 14) |
Uptime: | 214:01:14 |
Calls: | 6,619 |
Calls today: | 1 |
Files: | 12,168 |
Messages: | 5,317,431 |