How do i make a custom 404 error?

Status
Not open for further replies.

tstonly

Member
Messages
53
Reaction score
0
Points
6
I'm not understanding how do i make a custom 404 error.
Is there a tutorial or something i can go by?
 

descalzo

Grim Squeaker
Community Support
Messages
9,373
Reaction score
326
Points
83
1. Create your 404 error page. I would call it 404.html (or 404.php , etc)
2. I usually store them (ie all my custom error pages) in a directory called error or errors (to keep them out of the way)
3. Open/create .htaccess in public_html and add line(s):

Code:
ErrorDocument 404 /error/404.html
ErrorDocument 401 /error/401.html

Adjust path to point to location where you stored your pages. Note leading / if you store them in a subdirectory
 

bradleyx

Member
Messages
108
Reaction score
1
Points
18
i use phpbb and use a custom page for the error page. as descalzo said you need to place those codes in ur .htaccess file and then make sure to have a 404 page or error page.

common error page is .shtml but it can be anything really. php and shtml are the best choices. but really shtml gives more options as it can give referrer, ip, file missing request.

php can do that as well but more complicated
 
Status
Not open for further replies.
Top