How to serve 410 from Apache rather than a 404

Posted by DanSingerman on Server Fault See other posts from Server Fault or by DanSingerman
Published on 2010-01-19T17:41:52Z Indexed on 2010/05/07 13:08 UTC
Read the original article Hit count: 300

Filed under:
|

On our site, we tend to remove pages a lot where the content has expired, and we want to return http status 410 rather than 404 for requests to pages (physical files) that don't exist on our server (the entire site is made up of static files).

We have tried

from http://diveintomark.org/archives/2003/03/27/http_error_410_gone but that just breaks our entire site, serving a 410 for every request.

We are using Apache 2.2.3

© Server Fault or respective owner

Related posts about apache

Related posts about mod-rewrite