Lighttpd referer issue
- by Chris
I have a problem to block files from accessing from different domains as my one.
I have added to my lighty config in the "virual host" following:
$HTTP["referer"] !~ "^($|http://www\.my-site\.net)" {
url.access-deny = ( "" )
}
but anyway the site www.example.com can access http://player.my-site.net/player.swf, also it can be accessed directly without a referrer.
any idea?
//EDIT
here is my old apache .htaccess with a rewrite rule thats works perfect, but i dont know how to convert it for lighty:
RewriteEngine on
RewriteBase /
RewriteCond %{HTTP_REFERER} !^http://my-site\.net/ [NC]
RewriteCond %{HTTP_REFERER} !^http://www\.my-site\.net/ [NC]
RewriteCond %{HTTP_REFERER} !^http://player\.my-site\.net/ [NC]
RewriteCond %{HTTP_REFERER} !^http://stream\.my-site\.net/ [NC]
RewriteRule .* - [L,R=404]