I have a htaccess rewrite rule code which works on Apache but not on litespeed.
<Files "bg.js">
SetEnvIfNoCase User-Agent .*autoit.* search_robot
Order Deny,Allow
Deny from All
Allow from env=search_robot
</Files>
I want to block all useragents except those that are a case insensitive match to autoit
.
How do I get the rewrite rule to work on litespeed?
Unfortunately, LiteSpeed does not support
SetEnvIf*
directives in.htaccess
files. As an alternative, you'll need to usemod_rewrite
: