Welcome! Log In Create A New Profile

Advanced

how prevent hotlink in nginx?

Posted by lt.iisidii 
how prevent hotlink in nginx?
September 12, 2012 11:48AM
I'm trying to elimitar the hotlink to my site, and I was trying to pass. Winginx converter with htaccess htaccess and no case.
The htaccess would be:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond% {REQUEST_FILENAME}!-F
RewriteCond% {REQUEST_FILENAME}!-D
RewriteRule. / index.php [L]
RewriteCond% {HTTP_REFERER}! ^ $
RewriteCond% {HTTP_REFERER}! ^ Http://misitio.net $ [NC]
RewriteCond% {HTTP_REFERER}! ^ Http://misitio.net/. * $ [NC]
RewriteCond% {HTTP_REFERER}! ^ Http://www.misitio.net $ [NC]
RewriteCond% {HTTP_REFERER}! ^ Http://www.misitio.net/. * $ [NC]
RewriteCond% {HTTP_REFERER}! ^ Http://www.google.com/reader/view/. * $ [NC]
RewriteCond% {HTTP_REFERER}! ^ Http://www.google.com/reader/m/view/. * $ [NC]
RewriteRule. * \. (Gif | jpg | jpeg | png | bmp) $ http://misitio.net/hotlink.png [R, NC, L]
</ IfModule>

Where, misitio.net / hotlink.php is a code that is responsible for doing something like this: http://i.imgur.com/JALcG.png

In other words, reduce the image size, what happens to grayscale and add a poster advertising my site.
As I said, I worked in apache, nginx fails to work.

sorry for my bad english.
Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 176
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