How to prevent Hotlink of WP multisite on Nginx?
-
Hi everyone i’m using WordPress on a multisite network (previously WP MU) on a server that use Nginx 1.2.2, the configuration that i use is this: https://www.ads-software.com/support/topic/nginx-php-fpm-php-apc-wordpress-multisite-subdirectory-wp-super-cache/page/2?replies=59. And works perfect… just one little problem, the “Protection for Hotlink”, that normaly i use on simple wordpress sites doesn’t work here.
The code that i use normaly is something like this, inside of “server {}”:
#Hotlink location ~* ^.+\.(jpg|jpeg|gif|png)$ { valid_referers none blocked server_names ~(mysite.com|google.|yahoo.|bing.|anothersitemine.com); if ($invalid_referer) { return 403; } }
I don’t have any idea how adapt this traditional protection of hotlink, to the WP MU configuration of https://www.ads-software.com/support/topic/nginx-php-fpm-php-apc-wordpress-multisite-subdirectory-wp-super-cache/page/2?replies=59.
I hope someone can help me. Thanks for reading.
- The topic ‘How to prevent Hotlink of WP multisite on Nginx?’ is closed to new replies.