PDA

View Full Version : .htaccess SetEnvIfNoCase Help


manofphat
11-20-2007, 05:45 PM
Hello,

I used to use the following in my .htaccess file in Apache. How would I go about writing it so it works with LiteSpeed?

SetEnvIfNoCase Referer hl2://xx\.xx\.xx\.xx allow_download
Order Deny,Allow
Allow from env=allow_download
Deny from all

Thank you for your time!

mistwang
11-20-2007, 05:55 PM
You can convert it to a rewrite rule.

felosi
11-21-2007, 10:55 AM
This is one of my customers here. Ive tried to find a substitute using rewrite rules to no avail. Would anyone happen to know the correct rewrite rule conversion for this?

mistwang
11-21-2007, 01:22 PM
Something like
RewriteCond %{HTTP_REFERER} !^hl2://xx\.xx\.xx\.xx$
RewriteRule .* - [F]

manofphat
11-21-2007, 01:41 PM
I can still view the contents of that directory when I'm not being referred by that IP.

Thanks!

mistwang
11-21-2007, 03:29 PM
add "RewriteEngine on" to your .htaccess