Created
December 30, 2024 10:44
-
-
Save davidmutero/f4c9142ff86859f9bb3697c36d29e8d3 to your computer and use it in GitHub Desktop.
Locking down files with Paid Memberships Pro using NGINX for Multisite Setup
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For subsites | |
rewrite ^\/wp-content\/uploads\/sites\/([0-9]+)\/(.*[\.pdf|\.doc|\.docx|\.ppt|\.zip])$ /wp-content/plugins/paid-memberships-pro/services/getfile.php?blog_id=$1&file=$2 last; | |
# For the main site | |
rewrite ^\/wp-content\/uploads\/(.*[\.pdf|\.doc|\.docx|\.ppt|\.zip])$ /wp-content/plugins/paid-memberships-pro/services/getfile.php?file=$1 last; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment