.htaccess file: Browser

For my website running on Wordpress, I want to block readers accessing it from UC Browser… I have one code to block only one browser with specific page redirection but what happens when we want to block multiple browser such as ‘Opera’ ‘UcBrowser’ etc.
. Is there a way I can detect UC Browser , Opera and block access via it?

My code with specific page redirect via .htaccess file::

RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} ^.*UCBrowser.*$ [NC]
RewriteRule .* browser-not-supported.html [L]
share 

Can I ask why you would want to do this? It seems a curious thing to want to do, and understanding your reasoning might help us provide a better solution.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.