Knowledge Base Article
How to allow/deny access to your website based on the visitor's browser?
Using the Apache Environment variables, you can allow or deny access to your website based on the browser the visitor is using.
To do this, you should add the following lines to your .htaccess file:
SetEnvIf User-Agent ^Mozilla 5.0 browser
Order Deny,Allow
Deny from all
Allow from env=browser
The above code will deny access to your website for all visitors using Mozilla Firefox.
For other browsers, you should replace Mozilla 5.0 with the corresponding agent. For example, if you wish to deny access to all visitors using Opera 9.5, you should replace Mozilla 5.0 with Opera 9.5.
Rating
|

