Create .htaccess file on a WAMP System
March 8th, 2010
No comments
If you are creating a new passwd file:
C:\wamp\bin\apache\Apache2.2.11\bin\htpasswd.exe -c passfile username
If your are editing and existing password file:
C:\wamp\bin\apache\Apache2.2.11\bin\htpasswd.exe passfile username
.htaccess contents:
AuthType Basic require valid-user Satisfy all AuthUserFile C:/webroot/passwdfile AuthName "My Secret Folder"
Move the created pass file to the desired location. and add a .htaccess file to the folder you want to protect and then gracefully restart apache.
This is done through the wamp system tray icon.
Categories: .htaccess