Reputation: 1
I thought this would be a simple task but either I am worng or am just missing the easy answer!
I need a way for Apache to return a 200 for any page including a 404 page. Is there any easy solution?
This is the current header response:
HTTP/1.1
404 Article not found
Date: Mon, 01 Apr 2013 18:05:38 GMT
Server: Apache P3P: CP="NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM"
Cache-Control: no-cache
Pragma: no-cache
Set-Cookie: 440d08f3c65b7f89402db924f5428cbd=ujg53v71nc68fi5pc36rllnd707; path=/
Set-Cookie: trcusr=%24%24; expires=Tue, 19-Jan-2038 03:14:07 GMT; path=/
Set-Cookie: cltid=103; expires=Tue, 19-Jan-2038 03:14:07 GMT; path=/
Set-Cookie: js_vsid=355; expires=Mon, 01-Apr-2013 22:05:38 GMT; path=/
Content-Type: text/html; charset=utf-8
Upvotes: 0
Views: 811
Reputation: 138251
I would use RewriteEngine to rewrite any URL to a file that doesn't exist to a page that does.
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^.*$ file-that-exists.html
Untested, but that should be close to it.
Upvotes: 1