.htaccess password protect

tim

Senior Member
can't find a previous thread to this but can i have some help asap?

i deleted my .htaccess cheat sheet on my 'poopa - can anyone give me info on how to protect the page?

i have two .ht files so far:

.htpasswd with

username: password


and


.htaccess with

AuthName "Secure Area"
AuthType Basic
AuthUserFile /path/to/your/directory/.htpasswd
require valid-user

and it's probably me being a retard but if i create the .htpasswd file, where is the /path/to/your/directory ?

is it just /home/public_html/htpasswd ?
 
It all depends on how you have set your apache installation up as the path varies.

Upload a php file with the phpinfo() command in it to the root of your site and it will tell you the path to file which will help you with the htaccess file.

There's probably a specific php command to do this but I don't recall what it is off the top of my head.
 
Hey tim what CP do you use for your web hosting I know some of them allow yopu to create .hta access files via the CP.
 
yeah but my ex-host being a pain in the arse cp x3 wouldnt load faster than 1 page every 15 mins.
 
;/ wow who do you host with...drop me a line Ill get you hooked up with a decent Nix hosting package for cheap dude! Second to none my hosting and comes with cpanel and alsorts of features!
 
Back
Top