I use the code below to protect my whole website under cakephp3 except for one url "/specifi/url" and It works well.
SetEnvIf Request_URI "\/specific\/url$" NOPASSWD=true
AuthUserFile /home/f/www/.htpasswd
AuthGroupFile /dev/null
AuthName "Password Protected"
AuthType Basic
Order Deny,Allow
Satisfy any
Deny from all
Require valid-user
Allow from env=NOPASSWD
The problem is that I want to be more strict with the REGEX. So I modify the first line that way:
SetEnvIf Request_URI "^\/specific\/url$" NOPASSWD=true
and it doesn't work anymore. Any idea why ?