How to allow only one user agent .htaccess?

I searched all google and I really need to know how to allow only one user agent on .htaccess?

All I have found is how to do this on a dedicated or private server.

+4
source share
1 answer

If the user agent you want to allow is: Lynx/2.8.8dev.12

Then you need these rules in the htaccess directory that you want to restrict:

 RewriteEngine On RewriteCond %{HTTP_USER_AGENT} !Lynx/2\.8\.8dev\.12 [NC] RewriteRule ^ - [F,L] 

Every other user agent is banned from 403.

+9
source

All Articles