i'm using this htaccess rule on a apache:
RewriteEngine on
RewriteCond %{HTTP_REFERER} example\.com [NC]
RewriteRule .* - [F]
.. and i would convert it to an lighttpd rewrite rule. How can i do this? I tried it but it does not work very well.
Seems to be answered here: Apache2 .htaccess rewrite rule to Lighttpd
So something like:
$HTTP["referer"] == "example.com" {
url.access-deny = ("")
}
If you need to match the sub-domains too:
$HTTP["referer"] =~ "^(.+\.|)example\.com$" {
url.access-deny = ("")
}