how to forbidden other site stealing my forum attachment ?

二戒 wangyu1314 at
Mon Jun 20 05:20:00 UTC 2016

Hello everyone,

My forum posts and attachments have been stolen much more by other site.
and I write a nginx rule to prevent, without success, please guide.

example this forum:

and my attachments url as

and my forum domain is, and forum script put into /bbs/

now I forbidden others site show my attachment, this rule don't work,
please help me.

I think should this line "location ~* ^/bbs/attachment+\.php?$" has
mistake, but I can't resolve it.

location ~* ^/bbs/attachment+\.php?$
valid_referers none blocked * server_names ~\.google\.
~\.baidu\. ~\.360\. ~\.bing\.;
if ($invalid_referer) {
# return 403;
rewrite ^.*$;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the nginx mailing list