Created
September 17, 2022 10:57
-
-
Save riyas-rawther/38968571e6e6606e4991ba32d0dc725f to your computer and use it in GitHub Desktop.
NGINX code block to redirect to WordPress login page, when the user is not login.
This file contains 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
//add this file to your site's configuration. It usually located inside the sites-enabled folder. | |
location ~ ^/wp-content/uploads/(?<file>restricted/.*) | |
{ | |
rewrite ^ /dl.php?file=$file last; | |
// get the dl.php from https://www.youtube.com/shorts/GLiDRC9dbPg | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment