Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hello,
I read the guide and found it extremly useful , what i want to ask is that can i get some more details on where to place the .htaccess and .htpasswd files.
I understood that the .htaccess should be placed in the directory i want to password protect.
Can you please just guide me assuming i just installed a fresh copy of apache and havent changed anything from the conf file , on how to password protect everything in the htdocs folder , just tell me where exactly to put the htaccess and htpasswd files and what to include in the .htaccess file. I have it installed on my c: partition as such C:\Program Files\Apache Group\Apache2 <-- is this what is known as the root folder?
Thanks in advance.

htaccess goes in whatever directory you want to protect. htpasswd can be anywhere because you tell Apache where it is using the directives in htaccess. In your case you would put htacces in your htdocs directory (this is the "Document Root" by default). C:\Program Files\Apache Group\Apache2 is the "Server Root". All is pretty well explained in the docs in the "How To.Tutorials" section - HOWEVER note that they do advise that using htaccess/htpasswd is NOT the way to go. Look at the How To section on Authentication,Authorization and Access Control which gives easy to follow instructions for the proper way to do it.

![]() |
Creating Band webpage
|
Cornfirming email webform...
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |