I've been trying to use .htaccess to password protect a folder for a website. Unfortunately I can't seem to get it to work. I'm not getting an error, but the password being set in the .htpasswd file is not working.
Any help would be much appreciated.
I can only assume my issue is I'm getting the path wrong for my .htpasswd file.
I used php to find the path and got this:
/var/www/vhosts/[MYURL]/httpdocs/clients/[CLIENT]/trade/.htpasswd
so I used the following code in my .htaccess:
AuthType Basic
AuthName "Secure Area"
AuthUserFile /var/www/vhosts/[MYURL]/httpdocs/clients/[CLIENT]/trade/.htpasswd
Require valid-user
Anyone got any ideas as to why my passwords aren't being accepted?