KirstyScott Posted January 7, 2009 Share Posted January 7, 2009 does anyone know how i re-direct a user to my /index.php if they try and navigate to a .php file that dosen't exist? apart from saying the 404 error of 'Object not found'? Quote Link to comment Share on other sites More sharing options...
envexlabs Posted January 7, 2009 Share Posted January 7, 2009 You can create a custom 404 page and use .htaccess to point to that file. http://www.pageresource.com/zine/custom404.htm Quote Link to comment Share on other sites More sharing options...
chronister Posted January 8, 2009 Share Posted January 8, 2009 If you wish to redirect to your index page, then you would add this to your .htaccess file. The .htaccess file should live in the root of the site. If it does not exist, you can create it. make sure you change "yoursite.com" to your actual domain name. .htaccess ErrorDocument 404 http://www.yoursite.com/index.php Nate Quote Link to comment 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.