Koozali.org: home of the SME Server

Legacy Forums => Experienced User Forum => Topic started by: darren on November 26, 2001, 08:30:37 AM

Title: re-directing bad addresses
Post by: darren on November 26, 2001, 08:30:37 AM
is there any way if someone accesses a page that does not exist i kicks to the main page or specific page because i have a website that i have just updated and i am getting alot of hits to old pages that don't exsist any more.



has anyone got any ideas
Title: Re: re-directing bad addresses
Post by: Todd on December 15, 2001, 12:41:33 AM
Darren,

The easy way to do this is to set up a custom 404 page in Apache using the .htaccess file

An entry like this will do what you want

ErrorDocument 404 /error.html

Where error.html is the page you want them to go to instead of seeing the standard 404 error page.

Todd
Title: Re: re-directing bad addresses
Post by: darren on December 17, 2001, 04:07:26 AM
the question is where to put the .htaccess file in e-smith do you just put it in the /home/e-smith/files/primary/html dir