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 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. 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 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
Archived
This topic is now archived and is closed to further replies.