jounin i put this code but nothing work /etc/nginx/common/locations-wo.conf.custom and /var/www/wordops.net/conf/nginx/.conf location / { if ($http_referer !~ "https://(www.)?wordops.net"){ rewrite .*.(gif|png|mp4)$ https://www.wordops.net/ redirect; } }
marty I think you want something more like this: location ~ \.mp4$ { valid_referers yourdomain.com *.yourdomain.com; if ($invalid_referer) { return 403; } } But depends what you are trying to prevent people doing.
jounin marty where exactly to put that code.. to be working, i dont want people not to download using internet download manager but it can be played on the browser..also worried about the bandwith
marty jounin where exactly to put that code. Probably best in it's own file in /var/www/yourdomain.com/conf/nginx/ jounin not to download using internet download manager but it can be played on the browser..also worried about the bandwith Personally I wouldn't serve video from a web server. That's what sites like YouTube are for (you can use an unlisted video), or use a cdn (various WP plugins for offloading media or protecting media from download). But off-topic for WordOps really. :-)