LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > Install/Configuration > How to enable mod_setenvif

Reply
 
Thread Tools Display Modes
  #1  
Old 08-23-2011, 03:26 PM
Django Django is offline
New Member
 
Join Date: Aug 2011
Posts: 3
Default How to enable mod_setenvif

Hello,

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

Thanks in advance

Last edited by Django; 08-23-2011 at 03:29 PM..
Reply With Quote
  #2  
Old 08-23-2011, 04:10 PM
webizen webizen is offline
LiteSpeed Staff
 
Join Date: Oct 2010
Posts: 2,337
lsws does not support mod_setenvif directly but you can set env through rewrite rule such as:
Quote:
RewriteRule (.*) - [env=myenv:1]
Reply With Quote
  #3  
Old 08-24-2011, 02:39 AM
Django Django is offline
New Member
 
Join Date: Aug 2011
Posts: 3
Quote:
Originally Posted by webizen View Post
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
Reply With Quote
  #4  
Old 08-24-2011, 09:17 AM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,590
Try rewrite rule like

RewriteCond &#37;{USER_AGENT} !(iPhone|iPad)
RewriteRule (.*) - [F]
Reply With Quote
  #5  
Old 08-24-2011, 10:12 AM
Django Django is offline
New Member
 
Join Date: Aug 2011
Posts: 3
Quote:
Originally Posted by mistwang View Post
Try rewrite rule like

RewriteCond &#37;{USER_AGENT} !(iPhone|iPad)
RewriteRule (.*) - [F]
Thank you!

I try with below and it works like a charm.

Code:
RewriteEngine on
RewriteCond &#37;{HTTP_USER_AGENT} !(iPhone|iPad|iPod)
RewriteRule (.*) - [F]
By the way, how can I use mod_h264_streaming?
Reply With Quote
  #6  
Old 08-24-2011, 02:30 PM
NiteWave NiteWave is offline
LiteSpeed Staff
 
Join Date: Sep 2009
Posts: 2,220
Quote:
By the way, how can I use mod_h264_streaming?
it's already there, from 4.1
refer wiki:
http://www.litespeedtech.com/support...:mp4_streaming
Reply With Quote
Reply

Tags
enable, php mod, setenvif

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 10:43 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.