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
Posted at Nginx Forum:
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...
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 [email protected] 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: [email protected]
phone: +7 495 7853149
location ~ .(jpg|jpeg|png|gif)$ {
valid_referers server_names blocked none;
if ($invalid_referer) {
rewrite ^(.*)$ /hotlink.png break;
}
}
I using something like it.
Thank you very much, it works perfectly.
vicky
Posted at Nginx Forum:
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...
Samfingcul, I did it as other members here advised me. Try it…
Posted at Nginx Forum:
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...
@vicky007 - hey. can you please tell me how you done it ? thanks
Posted at Nginx Forum:
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...
None of the above methos has helped me.
My files are .swf and .mp4 .
Here is an example of my conf
valid_referers none blocked mysite.com ;
location /home/tophi/www/files/
{
if ($invalid_referer) {
rewrite ^ /home/tophi/www/images/hl.png last;
}
}
location ~ .(swf|mp4)$ {
valid_referers server_names blocked .mysite.com;
if ($invalid_referer) {
rewrite ^(. )$ /home/tophi/www/images/hl.png break;
}
}
please advice
thanks
Posted at Nginx Forum:
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...
Try this:
location ~ .(swf|mp4)$ {
valid_referers server_names blocked .mysite.com;
if ($invalid_referer) {
rewrite ^(. )$ /hl.png break;
}
}
location =/hl.png {
root /home/tophi/www/images;
}
2011/7/16 tophi [email protected]
So not I’m not able to direct download the file, but videos also can not
be started from the website’s player. I have changed *.mysite.com; also
with mysite.com and www.mysite.com , same result
Try this:
location ~ .(swf|mp4)$ {
valid_referers server_names blocked .mysite.com;
if ($invalid_referer) {
rewrite ^(. )$ /hl.png break;
}
}
location =/hl.png {
root /home/tophi/www/images;
}
2011/7/16 tophi [email protected]
Posted at Nginx Forum:
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...
try this :
location ~ .(swf|mp4)$ {
valid_referers server_names .mysite.com;
if ($invalid_referer) {
rewrite ^(. )$ /hl.png break;
}
}
location =/hl.png {
root /home/tophi/www/images;
}
or you can try this one
location ~ .(swf|mp4)$ {
valid_referers server_names none .mysite.com;
if ($invalid_referer) {
rewrite ^(. )$ /hl.png break;
}
}
location =/hl.png {
root /home/tophi/www/images;
}
hope it useful