Not working in NGINX
-
Hi,
I’m not sure if it’s not working or it doesn’t do what I think it does. I’d like to prevent any non-authenticated user from directly linking to a media file in my site.
I’m running nginx on ubuntu and I placed this at the end of the server block in the config file for the site i’m trying to protect
location ~ .*(/protectedfiles) {
return 301 $scheme://$http_host/?mo_media_restrict_request=1&redirect_to=$request_uri;
}and restarted nginx. Even after quitting and clearing the cache, I can enter the url to where a pdf exists and view/download it without being logged into the wordpress site.
Thanks,
Jeff
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Not working in NGINX’ is closed to new replies.