.htaccess Allow All from Specific User Agent

前端 未结 5 1113
故里飘歌
故里飘歌 2020-12-07 21:48

I have a website I am developing that is also going to be pulled into a web app. I have the following code in my .htaccess file to prevent access from ANYONE th

5条回答
  •  爱一瞬间的悲伤
    2020-12-07 22:48

    If you don't want to use mode_rewrite, with Apache 2.4 you can use something similar to this:

    
                    AuthType Basic
                    AuthName "Enter Login and Password to Enter"
                    AuthUserFile /home/content/html/.htpasswd
                    
                    Require all granted
                    
                    
                    Require valid-user
                    Require ip 12.34.567.89
                    
    
    

提交回复
热议问题