.htaccess
- Code: Select all
AuthUserFile C:\xampp\htdocs\Test\downloads\.htpasswd
AuthType Basic
AuthName "My Secret Folder"
Require valid-user
.htpasswd
- Code: Select all
PIM:$apr1$ouCx1Nsv$lC9445ysbdHXCf4XlriDW/
Both files are stored in donwloads folder and together with the file B747-4.xlsm
The link to the file is as follows:
- Code: Select all
<a href='downloads/B747-4.xlsm' class="read-more" target="_blank">DOWNLOAD</a>
When I hit the above link the file is downloaded without requesting for a password.
The rewrite module in the httpd.conf file is commented out (enabled)
- Code: Select all
LoadModule rewrite_module modules/mod_rewrite.so
And all instances of AllowOverride are set to All
This is the first time I'm trying to password protect a file so maybe I am missing something. all help is welcome!