Jump to content

Recommended Posts

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

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

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.