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. 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. Link to comment https://forums.phpfreaks.com/topic/189354-htaccess-help/#findComment-1000201 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.