All I want to do is include my header and footer into my 404 file, but of course include requires php, and the 404 is an shtml file.
I've searched on and off for about year now, and have found many "solutions", but none of them work.
How can I accomplish this?
Below is the collection of "solutions" I've tried from various posts all over the internet, grouped by the actual results they achieve:
Result: 500 Error - redirect permanent 404.shtml 404.php
Result: No redirect, goes to unparsed 404.shtml Result:ignores custom page; just goes to a generic "File not found" page - <Files *.shtml>ForceType application/x-httpd-php</Files>
- AddType application/x-httpd-php .shtml
- <Files 404.shtml> ForceType application/x-httpd-php.php</Files>
- RemoveHandler .shtml
AddType application/x-httpd-php .shtml
- AddType application/x-httpd-php .shtml
Goes to the 404.shtml page, but no parsing. - <FilesMatch "\.(shtm)$">
SetHandler application/x-httpd-php
</FilesMatch>
- <FilesMatch "404.(shtm)$">
SetHandler application/x-httpd-php
</FilesMatch>
Returns a generic "File not found" page - <Files *.shtml>
ForceType application/x-httpd-php
</Files>
- <Files 404.shtml>
ForceType application/x-httpd-php.php
</Files>
- RemoveHandler .shtml
- AddType application/x-httpd-php .shtml
- AddType application/x-httpd-php .shtml
PS. I won't be using bullet points in a post again!