Jump to content

Recommended Posts

It's not working. im trying to protect my site for just me and my friends but htacess and htpasswd files arent working.I am not prompted for a username and password. ive tried like 5 tutorials and none work. If anyone could possibly explain step by step id appreciate it.

Link to comment
https://forums.phpfreaks.com/topic/85297-solved-httacess-in-www-directory/
Share on other sites

Have you enabled .htaccess support within the httpd.conf? .htaccess files wont work by default. You have to configure Apache to use .htaccess files by setting up the AllowOverride directive within the httpd.conf.

 

Got to Apaches main <Directory></Directory> directive within the httpd.conf and look for the following lines:

#
    # 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 None

 

Change AllowOverride None to AllowOverride All

 

Save the httpd.conf and restart Apache. Apache should now be reading your .htaccess files.

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.