Mobile app version of vmapp.org
Login or Join
Vandalay111

: What errors should I create custom pages for besides 404? I know most sites typically create a custom 404 page. Are there any other custom error pages I should create? Or just watch my

@Vandalay111

Posted in: #WebsiteDesign

I know most sites typically create a custom 404 page. Are there any other custom error pages I should create? Or just watch my logs and see which ones are hit more frequently?

[Edit]
This is for a PHP web app, not a blog or static html site.

10.05% popularity Vote Up Vote Down


Login to follow query

More posts by @Vandalay111

5 Comments

Sorted by latest first Latest Oldest Best

 

@Candy875

For most sites 404 and 500 are all you need. If your site has a member login then you could use a 401, but most times you want to redirect to a login page for this rather than displaying an "error".

10% popularity Vote Up Vote Down


 

@Angie530

It's nice to keep redirects, authentication requirements, and other miscellaneous housekeeping in a single script for a variety of reasons.

I use a modified version of this PHP handler script for 404's and 301's - you will probably want to set up static 500-series pages (so your web server can return something useful in the event that the PHP parser is failing for whatever reason).

10% popularity Vote Up Vote Down


 

@Pope3001725

We just have a 404. The big trick we did is that our 404 script looks for moved pages, and throws the moved status correctly.

10% popularity Vote Up Vote Down


 

@Sue5673885

On my sites, I create error pages for errors that I think people may commonly run across. Other than 404, here are the ones I target:


500: Internal Server Error - if your app fails, showing a generic 500 error page will only confuse users
403/401: Forbidden/Unauthorized - I display a custom error page when a user tries to access something that they're not allowed to access.
400: Bad Request - pretty self-explicable
409: Conflict - if a user is blocked from some functionality by the throttling/rate-limiting, I tell them to try again

10% popularity Vote Up Vote Down


 

@Hamaas447

It's difficult to give you a direct answer if you don't provide an example use case.

Here is a list with all Status Codes you can/should use for differrnt cases (redirected, removed, etc.). So you could search for your case, select the right code and if it is necessary create a costum error page.

Here are the examples who maybe needs a costum error page quoted from my apache.conf:


Customizable error responses come in three flavors:
1) plain text 2) local redirects 3) external redirects

Some examples:


ErrorDocument 500 "The server made a boo boo."
ErrorDocument 404 /missing.html
ErrorDocument 404 "/cgi-bin/missing_handler.pl"
ErrorDocument 402 www.example.com/subscription_info.html

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme