• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

.htaccess password protect


tim

Senior Member
#1
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 ?
 

openmind

Senior Member
#2
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.
 

tim

Senior Member
#5
yeah but my ex-host being a pain in the arse cp x3 wouldnt load faster than 1 page every 15 mins.
 

glenwheeler

Senior Member
#6
;/ 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!