I created a 500.html file and would like to get this page loaded for my wordpress site. I’m running on XAMP localhost for now, but I’ve never done this sort of thing before and would like to be able to get it working on my localhost first to be sure it will work on the live server, when deployed.
So far I have tried the following in my .htaccess file:
ErrorDocument 500 http://localhost/500.html
But this does not work and does not show the 500.html file when I do this in my header.php file custom wordpress theme (at the very top):
throw new Exception('Nooooooooooooooo!');
I figure this should throw a 500 error, but all I get is a blank page. I also tried putting the 500.html file within the themes root folder, and link to that, but no luck. Currently, this is what is in my .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteRule ^^members/([^/]*)/([^/]*)/? /^members/$matches[1]/?$matches[2] [QSA,L]
RewriteRule ^^/([^/]*)/([^/]*)/? /^/$matches[1]/?$matches[2] [QSA,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
ErrorDocument 500 http://localhost/500.html
Does wordpress have any built-in settings for doing this? If there is something I need to put into my .htaccess file, where do I put it at?