I have to deal with this on nearly every site I build, and I really don’t know the best way to handle it.
My problem with ExpressionEngine’s standard way of dealing with 404s is that it won’t throw an error if the template group is correct in the URL. So if I have a template group called “News” and someone navigates to http://myurl.com/news/wrong_article_url, it will display the index template of the News group, instead of a 404.
I’ve tried using the .htaccess file to redirect to a static 404 page, but it doesn’t seem to work:
ErrorDocument 404 /404.htmlIs there something special I need to be doing? What about 500 errors?
How do you deal with server errors in ExpressionEngine?