我尝试从受保护的网站中排除子网址“/shop/api”。它在 Apache/2.2.15 上的不同服务器上运行良好,但现在不适用于 Apache/2.4.7?它总是要求进行基本身份验证。知道我做错了什么吗?
AuthType Basic
AuthName 'Authentication required'
AuthUserFile /var/www/vhosts/pwd/.htpasswd
# Allow access to excluded diretories
SetEnvIf Request_URI ^/shop/api/ noauth=1
Order deny,allow
Satisfy any
Deny from all
Require valid-user
Allow from env=noauth
Run Code Online (Sandbox Code Playgroud)