speedy33417 Posted January 21, 2010 Share Posted January 21, 2010 I've just completed a redesign of an old website. Some of the page URLs will be changed and I need to redirect ALL traffic to the homepage (index.php) if the visitor may end up at an old page (search engine index, browser favorite, etc.) I'm sure it's just a few lines of code but not sure where to start. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/189354-htaccess-help/ Share on other sites More sharing options...
DJCMBear Posted January 22, 2010 Share Posted January 22, 2010 If you havent got one already use a .ht ErrorDocument code like this. ErrorDocument 404 http://www.yoursite.com/ If the file wasnt found then the HTTP/404 will be called and with the .ht 404 error code your site will see you want all errors to be redirected to your home page. Quote Link to comment https://forums.phpfreaks.com/topic/189354-htaccess-help/#findComment-1000201 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.