I am ready to push a site to production (currently on staging), but I'm having a slight problem with the internal server error 500 page.
I have created a file in web/errors/error500.php
and I've also got: ErrorDocument 500 errors/error500.php
in my .htaccess file
The problem is, if there is a 500 error in the admin, it displays the symfony default 500 page instead of mine in the errors
folder.
Does anyone have a rough idea why this is?
I've cleared symfony cache, cleared开发者_运维技巧 browser cache and used several browsers.
Thanks
The standard Symfony way of doing this isn't with an Apache ErrorDocument directive, but simply by putting your error page in either <project>/apps/<appname>/config/error/error.html.php
or <project>/config/error/error.html.php
, for per-app or general error pages respectively. See this checklist item on the very handy Symfony Deployment Cheat Sheet.
Also make sure you are not in debug mode when you test this otherwise it will still show full stack trace.
精彩评论