HTML Basix - HTML tutorials and online webmaster tools


Htaccess code generators Code generators Tutorials

Online and offline code generators


Subscribe to RSS feed
Subscribe to the HTML Basix RSS feed.

Custom Error Page Code Generator


Set your custom error pages using htaccess. Create a page just like any other, with a message like 'sorry, the page you are looking for cannot be found' (404) or 'there is a problem running this script' (500). Upload your custom pages to your website and use the generator below to create the code to place into your htaccess file.
  • Create custom pages for each error code you wish to use - page not found, internal server error, etc. It's easier if you call them '404.html' or '500.html' etc.
  • red asterisk denotes the more common error pages used - however, you may have a need for the other error codes
  • Upload the custom pages to your website. They can either be in the root folder for your domain, or in a sub-folder. If in a sub-folder, you will need to state the path from the domain root.
  • Enter the relative link to the page in the text box next to the error code you wish to use (from domain root) WITHOUT a leading slash
  • Copy the code and paste it into notepad and save it as htaccess.txt. Upload it in ASCII format to the root folder for your domain (ie, where the user goes to when they first enter your site) and rename it to .htaccess (remember the dot!!)
  • Unless you have your ftp program set to show invisible files, the file will then disappear from sight. Don't worry, it's still there!
  • If you have an existing htaccess file, copy and paste the generated code into that.
  • If you are using this on a subdomain, you may find that it doesn't work. It depends on whether your subdomains are 'true subs' or symlinked from under the domain. If this is the case, use a full url (ie, http://sub.domain.com/errorpage.html).



error codespath to custom page
(ie: /404.html or /custom/404.html)
301 Moved Permanently
302 Moved Temporarily
400 Bad Request *
401 Authorization Required *
403 Forbidden *
404 Not Found *
405 Method Not Allowed
408 Request Timed Out
415 Unsupported Media Type
500 Internal Server Error *
501 Not Implemented
502 Bad Gateway
503 Service Unavailable *
504 Gateway Timeout
505 HTTP Version Not Supported

 

Page will open in a new window



Site Stats     
VisitorsPageviews
Total: 8,660,751 Total: 23,289,981
Today: 902 Today: 2,550
Yesterday: 1,281 Yesterday: 3,497
Past Month: 39,711 Past Month: 108,407

1,323 visitors in the last 24 hours
This page has been visited 142,814 times
There are currently 7 visitors online
click to see where
most people online at once:
286 visitors on 06/27/2012
   You beaut











This site is © HTML Basix 2003 - 2009