Welcome! Log In Create A New Profile

Advanced

Problem with Hotlink Protection

September 14, 2011 11:19AM
Dear all,

I am having a problem getting hotlinking protection to work. I run an image gallery on a nginx webserver and would like to achieve that hotlinking to the images on the website is impossible to save bandwidth.

I have the following code in my location block:

<-- SNIP --->

location ~* \.(png|gif|jpg|jpeg)$ {
valid_referers server_names;
if ($invalid_referer) {
return 403;
}
}

<-- SNAP -->

That works fine so far. But the problem is that the gallery script creates image links that look like this:

<-- SNIP --->

http://www.mydomain.com/image.php?twg_album=album-05900-05999&twg_show=image-05995.jpg

<-- SNAP -->

These do not trigger the hotlink protection. I am totally lost and have no idea how I might be able to protect those image links from hotlinking.
Any help would be highly appreciated! Thank you all in advance!

Kind regards
-Amitz
Subject Author Posted

Problem with Hotlink Protection

dullnicker September 14, 2011 11:19AM

Re: Problem with Hotlink Protection

Francis Daly September 14, 2011 11:54AM

Re: Problem with Hotlink Protection

dullnicker September 14, 2011 12:22PM

Re: Problem with Hotlink Protection

Francis Daly September 14, 2011 03:24PM

Re: Problem with Hotlink Protection

António P. P. Almeida September 14, 2011 03:58PM

Re: Problem with Hotlink Protection

dullnicker September 16, 2011 02:47PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 287
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready