htaccess exclude one url from Basic Auth

前端 未结 8 1713
失恋的感觉
失恋的感觉 2020-11-30 20:54

I need to exclude one Url (or even better one prefix) from normal htaccess Basic Auth protection. Something like /callbacks/myBank or /callbacks/.*

8条回答
  •  星月不相逢
    2020-11-30 21:09

    
            SetEnvIf Request_URI "/callback/.*" REDIRECT_noauth=1
    
            AuthType Basic
            AuthName "Restricted Files"
            AuthUserFile /etc/httpd/passwords/passwords
            Order Deny,Allow
            Satisfy any
            Deny from all
            Allow from env=REDIRECT_noauth
            Require user yournickname
    
    

提交回复
热议问题