prakash Posted May 14, 2008 Share Posted May 14, 2008 Hi, I have currently following code for denying directory listing on .htaccess Options All -Indexes but I want to redirect to the home page (say it http://www.domain.co.uk) instead of displaying Forbidden page. how could it be possible? any help will be greatly appreciated. thanks Quote Link to comment https://forums.phpfreaks.com/topic/105660-solved-how-to-redirect-instead-of-denying-directory-listing/ Share on other sites More sharing options...
wildteen88 Posted May 15, 2008 Share Posted May 15, 2008 Add the following ErrorDocument 403 http://www.yoursite.com/ to your .htaccess. If a 403 error occurs then the user should be redirected back to your site. Quote Link to comment https://forums.phpfreaks.com/topic/105660-solved-how-to-redirect-instead-of-denying-directory-listing/#findComment-541998 Share on other sites More sharing options...
prakash Posted May 15, 2008 Author Share Posted May 15, 2008 thx wildteen88 it's working Quote Link to comment https://forums.phpfreaks.com/topic/105660-solved-how-to-redirect-instead-of-denying-directory-listing/#findComment-542047 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.