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.

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.