Try this:<br><br>location ~ \.(swf|mp4)$ {<br>    
valid_referers server_names blocked *.<a href="http://mysite.com/" target="_blank">mysite.com</a>;<br>    
if ($invalid_referer) {<br>        
rewrite ^(.*)$ /hl.png break;<br>    
}<br>
}<br><br>location =/hl.png {<br>    root  /home/tophi/www/images;<br>}<br><br><div class="gmail_quote">2011/7/16 tophi <span dir="ltr">&lt;<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
None of the above methos has helped me.<br>
My files are .swf and .mp4 .<br>
Here is an example of my conf<br>
<br>
<br>
valid_referers none blocked <a href="http://mysite.com" target="_blank">mysite.com</a>;<br>
location /home/tophi/www/files/<br>
{<br>
if ($invalid_referer) {<br>
rewrite ^ /home/tophi/www/images/hl.png last;<br>
}<br>
}<br>
<br>
<br>
location ~ \.(swf|mp4)$ {<br>
valid_referers server_names blocked *.<a href="http://mysite.com" target="_blank">mysite.com</a>;<br>
if ($invalid_referer) {<br>
rewrite ^(.*)$ /home/tophi/www/images/hl.png break;<br>
}<br>
}<br>
<br>
please advice<br>
thanks<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?2,39501,212475#msg-212475" target="_blank">http://forum.nginx.org/read.php?2,39501,212475#msg-212475</a><br>
<br>
<br>
_______________________________________________<br>
nginx mailing list<br>
<a href="mailto:nginx@nginx.org">nginx@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx" target="_blank">http://nginx.org/mailman/listinfo/nginx</a><br>
</blockquote></div><br><br clear="all"><br>-- <br>Wendal Chen<br><a href="http://t.sina.com.cn/1068040557?s=6uyXnP" target="_blank"><img alt="" src="http://service.t.sina.com.cn/widget/qmd/1068040557/e0a18d12/3.png?rnd=1302310535458" border="0"></a><br>
<br>