Koozali.org: home of the SME Server

re-directing bad addresses

darren

re-directing bad addresses
« 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

Todd

Re: re-directing bad addresses
« Reply #1 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

darren

Re: re-directing bad addresses
« Reply #2 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