html .htaccess file

Protecting your web page with .htaccess

  • create the password file by running
    • htpasswd -c .htpasswd <filename>
  • Set permissions to prevent viewing the file contents with a web browser
  • Store the password file in a directory external to your web directory.
  • create .htaccess file and fill it with something like
    • AuthType Basic
    • AuthUserFile <filename from above>
    • AuthName "<Title you want displayed>"
    • require valid-user
    • satisfy any
    • deny from all


-- StevenLindsey - 14 Oct 2009

Topic revision: r2 - 2009-12-29 - 14:35:52 - JoeyArmstrong
 
Copyright © 1824-2009 Rensselaer Polytechnic Institute (RPI)
110 Eighth Street, Troy, NY USA 12180 (518) 276-8326