hotlink protection with rewrite

proforg proforg at maloletka.ru
Sun Jan 10 21:44:30 MSK 2010


Hi !
Something like this :

valid_referers   none  blocked domain.tld www.domain.tld;

location /flv/
{
   if ($invalid_referer) {
        rewrite ^ /path/to/hotlink.flv last;
    }
}

On Mon, Jan 11, 2010 at 1:29 AM, vicky007 <nginx-forum at nginx.us> wrote:
> Hello,
> I moved from apache to nginx few quite busy websites and currently I need help with hotlink protection of swf/flt files. I can send hotlinking domains to 403, but I want to supply them with for example hotlink.swf file of my own.
>
> I have not figured out how to rewrite the url in case of referer other than my own domains. Would anyone be so kind and advise me in this?
>
> Thank you..
>
> Vicky




-- 
Aleksej Besciokov
EMail/JID: proforg at maloletka.ru
phone: +7 495 7853149



More information about the nginx mailing list