Hello,
I've been researching and trying ways to get my .htaccess file's ErrorDocument 404 to return the proper HTTP Status when using a custom 404 page. So far, I'm only able to generate the HTTP/1.1 200 OK header.
I noticed that calling missing .cfm files will result in a standard, server 404 error message, with proper status headers. All other file types, .html, .htm return my custom 404 page with the 200 OK status.
Any guidance would be greatly appreciated. I've included the htaccess file below.
--- Begin .htaccess ---
<Files .htaccess>
order allow,deny
deny from all
</Files>
Options -Indexes
RewriteEngine on
Options FollowSymlinks
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.cfm\ HTTP/
RewriteRule ^index\.cfm$ http://www.example.com/ [R=301,L]
ErrorDocument 404 /404error.cfm
--- End .htaccess ---
[edited by: jdMorgan at 10:08 pm (utc) on Apr 5, 2010]
[edit reason] example.com [/edit]