How to put up your own error page or 404 file not found.

greenspun.com : LUSENET : S-Mart Shopping Cart : One Thread

Hi,

How to put up your own error page or 404 file not found.

First create a file called .htaccess Put a period before htaccess Place it your root directory the same directory your "index.html" file is in.

In the .htaccess file put in the line

ErrorDocument 404 http://www.yourname.com/home.html

Change the URL to your error page. You can make your own error page or copy a existing page. What I did was copy my "index.html" file and called it "home.html" as long as someone types in the right base URL but mis-types the page or directory or if they use a old link that there is no page for they will go to the default page. If you are using "Java Script" you can set your error page to send them, redirect, to a different page. You could use .htaccess to redirect to a different web site if you changed you name.

No more lost customers because of bad spelling or old links.

Jim

-- James L. Farmer (jim@team-blankets.com), July 15, 1999

Answers

: )

-- Patrick Chan (patrickccf@hotmail.com), February 15, 2000.

Moderation questions? read the FAQ