Problem with Hotlink Protection

Francis Daly francis at
Wed Sep 14 18:51:20 UTC 2011

On Wed, Sep 14, 2011 at 12:22:30PM -0400, dullnicker wrote:

Hi there,

> thank you very much indeed for taking the time to help me out. It seems
> that - with your help - I made it! :-)

You're welcome; and congratulations :-)

> I inserted the "invalid_referrer" check within the "location ~* \.php$"
> block like you suggested and it works like a charm now!

Good stuff.

> location ~ \.php(.*)$ {

Note that this config applies to all urls that include the four characters
".php"; that certainly includes your /image.php script, but possibly
also includes more.

If you're happy that all of those have this invalid_referer check,
then it's fine. If not, you'll want to adjust the config again.

All the best,

Francis Daly        francis at

More information about the nginx mailing list