I want anyone to be able to read 'file.php' but I want to password protect the same file if the url is 'file.php?page=mypage'. I've tried htpasswd but it isn't working:
<FilesMatch "page.php?page=mypage">
AuthName "Secret page"
AuthType Basic
AuthUserFile /home/cowfart/public_html/.htpasswd
require valid-user
</FilesMatch>
What else could I do to make it work? By the way, this website is based around one file which gets variables from the url and echos other files depending on this variable