I'm trying to put protection on two pages. However when I click cancel, those pages are displayed. I'm using WordPress, this is the setting in my .htaccess file.
SetEnvIf Request_URI "^/page/page1/$" PAGE1
# use BASIC authentication only when env variable PAGE1 is set
AuthType Basic
Authname "Users zone"
AuthUserFile "/path/to/passwd"
Require valid-user
Satisfy any
Order allow,deny
Allow from all
Deny from env=PAGE1
SetEnvIf Request_URI "^/page/page2/$" PAGE2
# use BASIC authentication only when env variable PAGE2 is set
AuthType Basic
Authname "Users zone"
AuthUserFile "/path/to/passwd"
Require valid-user
Satisfy any
Order allow,deny
Allow from all
Deny from env=PAGE2