0

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.

1 Answer 1

0

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 = ("")
}

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .