How to enable mod_setenvif

#1
Hello,

Please help me to enable mod_setenvif in LiteSpeed 4. I'm using LiteSpeed with DirectAdmin.

Thanks in advance
 
Last edited:
#3
lsws does not support mod_setenvif directly but you can set env through rewrite rule such as:
Thanks. I try with htaccess file look like below

Code:
SetEnvIfNoCase User-Agent .*iPhone.* iDevides
SetEnvIfNoCase User-Agent .*iPad.* iDevides
<Limit GET POST>
deny from all
Allow from env=iDevides
</Limit>
RewriteRule (.*) - [env=iDevides:1]
I think I was wrong in sth 'cause it didn't works
 
#5
Try rewrite rule like

RewriteCond %{USER_AGENT} !(iPhone|iPad)
RewriteRule (.*) - [F]
Thank you!

I try with below and it works like a charm.

Code:
RewriteEngine on
RewriteCond %{HTTP_USER_AGENT} !(iPhone|iPad|iPod)
RewriteRule (.*) - [F]
By the way, how can I use mod_h264_streaming?
 
Top