mars_rahul Posted June 25, 2008 Share Posted June 25, 2008 i am using Apache server (xamp) in windows 2000. i want to disallow user to list out the files in folders such as includes and images. eg: localhost/website/includes in Includes folder i have connection files based on php and other files also. what i want is when user type : localhost/webiste/inlcudes/ or localhost/webiste/inlcudes/connection.php i want user not to access that folder using .htaccess. Any one who can support me please. I will be waiting for the suggestion thanks Rahul - IT Professional Quote Link to comment https://forums.phpfreaks.com/topic/111828-not-allowing-directory-files-to-list-out/ Share on other sites More sharing options...
rhodesa Posted June 25, 2008 Share Posted June 25, 2008 place an .htaccess file in the directory and use the following directives: if you want to deny all access (this means no directory list, or file can be loaded) use this: deny from all ...p.s. - php can still access these files from a filesystem level, it will just block web access if you want to just block directory listings, but still allow files to be loaded (good for things like an image directory) use this: Options -Indexes note: if the above don't work, let me know. then we'll have to change the httpd.conf file Quote Link to comment https://forums.phpfreaks.com/topic/111828-not-allowing-directory-files-to-list-out/#findComment-574066 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.