KB 109

From SWCP Support Wiki
Revision as of 11:32, 4 June 2008 by Jamii (talk | contribs) (New page: ===Can I create a custom 404 Error page for my website?=== Article:109 Created:2001-03-21 15:13:59 Categories: Web Publishing ====Question or Symptom==== When someone tries to acces...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Can I create a custom 404 Error page for my website?

Article:109
Created:2001-03-21 15:13:59
Categories:
  Web Publishing

Question or Symptom

When someone tries to access a non-existant web page in my site is there a way to give them a custom message rather than your generic system error message?


Resolution

Yes. You'll need to create a .htaccess file. This will usually be in your public_html directory. If you already have an .htaccess file you just need to add a line to it.

Suppose your website is accessed by http://www.swcp.com/~jai and the page you'd like to display for 404 errors is named err404.html. Your .htaccess file should look like:

ErrorDocument 404 http://www.swcp.com/~jai/err404.html

Now any reference to a non-existant file in your website will pull up this page.

 KB 85 How do I create a custom 404 message on my web site?