0 Users appreciate this thread.
[Tutorial] Custom Error Pages
NINTENDO64 (2012-10-30 00:32:39)Or you coud just make a 404.shtml file
"If today were the last day of my life, would I want to do what I am about to do today?"
-Steve Jobs
DBS
-Steve Jobs
DBS
klubadmin (2012-10-30 02:50:48)@NINTENDO64 Unless the host has a special feature that detects that file, that won't work.
Log in to submit a comment
Back to forum: Web Programming (HTML, JS, CSS, PHP, MySQL)
New registered users today: 7
Newest registered user: ElegantVulpes

Ever seen one of those nice 404 errors you get when you go to a page that no longer exists (or never did)? Ever want your own? Here's how the pros do it:
Step 1 - Create the page
Simply create a .html or .php file that looks pretty and lets the viewer know that they went to a nonexistent page and that they got a 404. Save it as something easy, like "404.html".
Step 2 - Create .htaccess
Now, some hosts may have disabled editing (or creating) this file, so check with you host if you can do this (however most hosts are fine). In the /public_html/ folder, create (if it doesn't exist) a file called .htaccess and make sure to spell it correctly.
Step 3 - Edit .htaccess
Go inside .htaccess and add:
ErrorDocument 404 /404.html
This tells the website that a 404 error should display the page "404.html" whenever it's triggered. Likewise, the same can be done for other errors, simply by replacing "404" with the error number.
And that's it! Have fun making your errors look pretty now!
2012-10-29 02:34:07
3dsklub.cf
Like what I said? +respect
>Official Trinate Spriter<