Hello,<br><br>I tried to add some rewrite rule to block hotlinking from other web sites. But the rules don&#39;t work, I go to my site (e.g. <a href="http://domain1.com">domain1.com</a>), the images won&#39;t load at all (using wordpress as the cms). Is there anything wrong for my conf file? Thanks.<br>
<br>server {<br>        listen      <a href="http://123.123.123.123:80">123.123.123.123:80</a>;<br>        server_name <a href="http://domain1.com">domain1.com</a> <a href="http://www.domain1.com">www.domain1.com</a>;<br>
<br>        #charset koi8-r;<br><br>        access_log  /home/logs/domain1.com.log;<br>    error_log /home/logs/domain1.com.error.log;<br><br>        location / {<br>            root   /home/user/docs;<br>            index  index.php index.html index.htm;<br>
            include /usr/local/nginx/conf/wp-rewrite;<br>}<br><br> location ~ \.(jpg|jpeg|png|gif)$ {<br>       valid_referers <a href="http://www.domain1.com">www.domain1.com</a> blocked none;<br>               if ($invalid_referer) {<br>
                       rewrite  ^(.*)$ /wp-content/uploads/av.gif break;<br>               }<br>       }<br><br>        location /zp {<br><br>            root   /home/user/docs;<br>            index  index.php;<br>            include /usr/local/nginx/conf/zp-rewrite;<br>
        }<br><br><br>        error_page  404              /404.html;<br>        location = /404.html {<br>            root   /usr/local/nginx/html;<br>        }<br><br>        # redirect server error pages to the static page /50x.html<br>
        #<br>        error_page   500 502 503 504  /50x.html;<br>        location = /50x.html {<br>            root   /usr/local/nginx/html;<br>        }<br><br>        # proxy the PHP scripts to Apache listening on <a href="http://127.0.0.1:80">127.0.0.1:80</a><br>
        #<br>        #location ~ \.php$ {<br>        #    proxy_pass   <a href="http://127.0.0.1">http://127.0.0.1</a>;<br>        #}<br><br>        # pass the PHP scripts to FastCGI server listening on <a href="http://127.0.0.1:9000">127.0.0.1:9000</a><br>
        #<br>        location ~ \.php$ {<br>            root           /home/user/docs;<br>            fastcgi_pass   <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;<br>            fastcgi_index  index.php;<br>            fastcgi_param  SCRIPT_FILENAME  /home/user/docs$fastcgi_script_name;<br>
            include        fastcgi_params;<br>        }<br><br>        # deny access to .htaccess files, if Apache&#39;s document root<br>        # concurs with nginx&#39;s one<br>        #<br>        location ~ /\.ht {<br>
            deny  all;<br>        }<br>    }<br><br>