Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The really interesting question is why the start page of cakecentral.com would be transmitted with a 404 error code.


I don't know if this is what's going on with cakecentral, but I did something like this inadvertently many years ago.

We needed to have a CGI script handle all hits under a certain location, and for various reasons mod_rewrite wasn't an option. So I put something like this in an .htaccess:

ErrorDocument 404 /path/to/script.cgi

I didn't realize until later I needed to explicitly set "Status: 200" in the script's headers. As far as browsers were concerned, everything worked, even IE, since the "error message" (our page content) was long enough to not trigger its built-in error message.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: