Can i use redirects to catch all 400, 403, 404 and 500 pages to one 404 page?


(Gabrielle Vickery) #1

Hi there,
I just want one 404 page which will catch anyone mistyping the domain name in or trying to get to a page which isn’t live. So I’ve created an oops page here: https://www.wesmcghee.com/404.php.

Can I simply pop this in my htaccess file or is it bad practice to do this?
ErrorDocument 400 https://www.wesmcghee.com/404.php
ErrorDocument 403 https://www.wesmcghee.com/404.php
ErrorDocument 404 https://www.wesmcghee.com/404.php
ErrorDocument 500 https://www.wesmcghee.com/404.php


(Jannis from inStacks Software) #2

Did you ever encountered these other errors (than 404 not found)?


(Gabrielle Vickery) #3

No not that I know of, I was just trying to cover all the possible error options. Is it unnecessary?


(Doug Bennett) #4

There’s a lot more than you have listed. Typing errors should get you a 404. Each error number has a reason, and really should be displayed to help the user determine what went wrong.


(Jannis from inStacks Software) #5

If you aren’t using special server side features beside PHP on Apache, you should be fine with 404.


(Barrie McDermid) #6

Your host should be able to give you some code to take care of everything. Fire them a support ticket.


(Steve Jenkins) #7

(system) #8

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.