Print Reseller Scheme
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

.htaccess password protect

Discussion in 'Website Design Forum:' started by tim, Mar 2, 2010.

  1. tim

    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


    .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 ?
  2. openmind

    openmind Senior Member

    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.
  3. tim

    tim Senior Member

    oh sweet thanks - much appreciated

    (bookmarked for stupid ol me)
  4. glenwheeler

    glenwheeler Senior Member

    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.
  5. tim

    tim Senior Member

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

    glenwheeler Senior Member

    ;/ 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!

Share This Page