Custom error pages1 user found helpful
Add the following line in your /config/site_theme_paths.php file
And C5 will use the view.php file in your my_theme directory or page_not_found.php file if that exists.
I had my entire error page already themed. for example :
I had to change a core file however. I can contribute it back if that's something useful to others.
in the page_not_found.php
i added this in the header
<?php header( 'Location:http://www.yourdomain.com/location/of/error/page/404.html'... ) ; ?>
simple to redirect to your 404 page, quick easy for a client of mine, and on my personal site
i don't know code was added to my code but this is the code without the code tag
header( 'Location:http://www.yourdomain.com/location/of/error/page/404.html'... ) ;
After using php's header function in /single_pages/page_not_found.php, were you still able to edit Content blocks? I've found that using header here breaks tiny_mce and I'm having to use meta-refresh instead which is less than ideal.
My question is, do I need to create individual setThemeByPath customizations for every possible error (403, 404, etc.)? Or will "page_not_found" cover them all?
I checked to verify "touching" was the handle. Then I copied my default.php and made it page_not_found.php just to see if I could get the theme to carry over...
Can you help? My site is temporarily at: