.htaccess Allow All from Specific User Agent

前端 未结 5 1109
故里飘歌
故里飘歌 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:50

    I just want to allow ONE SPECIFIC user agent rather than trying to block all

    Here's my config to allow only wget:

    SetEnvIf User-Agent .*Wget* wget
    
    Order deny,allow
    Deny from all
    Allow from env=wget
    

提交回复
热议问题