Jump to content

Block directory


seeya

Recommended Posts

If there is an index.php or index.html, the folder contents will not be displayed. If you don't want anyone accessing your index file, you will need to do a HTTP Auth through .htaccess and require a login for that folder. Once you are logged in, you should be able to use it at will until you close out that browser and open a new one. You'd then have to re-login.

 

PhREEEk

Link to comment
Share on other sites

i've tried in on my localhost (my laptop) it doesnt work.

 

i've created 2 files, .htaccess and .htpasswd

 

in .htaccess, i have the following code.

 

AuthUserFile C:\Apache Group\Apache2\htdocs\vestito10\.htpasswd
AuthType Basic
AuthName "My Secret Folder"
Require valid-user

 

in .htpasswd, i have the following.

 

fred:p29cmnwl4a0et

 

 

is there anything wrong?

Link to comment
Share on other sites

    # AllowOverride controls what directives may be placed in .htaccess files.

    # It can be "All", "None", or any combination of the keywords:

    #  Options FileInfo AuthConfig Limit

    #

    AllowOverride All

 

Look for this in your httpd.conf file and change AllowOverride to All, it is defaulted to NONE.

Link to comment
Share on other sites

    # AllowOverride controls what directives may be placed in .htaccess files.

    # It can be "All", "None", or any combination of the keywords:

    #  Options FileInfo AuthConfig Limit

    #

    AllowOverride All

 

Look for this in your httpd.conf file and change AllowOverride to All, it is defaulted to NONE.

 

this is not in my httpd.conf

 

in my .htaccess file, i have this line:

AddType application/x-httpd-php .html

at the end... try adding it?

 

it doesnt work

Link to comment
Share on other sites

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.