Created
March 4, 2012 20:57
-
-
Save joshtronic/1974753 to your computer and use it in GitHub Desktop.
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
# Block empty blocked or whitelisted referers | |
location ~ ^/gallery/(\d+)/(\d+)/(\d+)-(\d+)-(\d+)\.(.+)$ | |
{ | |
valid_referers none blocked scenekids.com ~(google.|yahoo.|bing.|facebook.|fbcdn.); | |
if ($invalid_referer) | |
{ | |
return 403; | |
} | |
} | |
# Redirect empty referrer back to the gallery | |
location ~ ^/gallery/(\d+)/(\d+)/(\d+)-(\d+)-(\d+)\.(.+)$ | |
{ | |
valid_referers blocked scenekids.com ~(google.|yahoo.|bing.|facebook.|fbcdn.); | |
if ($invalid_referer) | |
{ | |
rewrite ^/gallery/(\d+)/(\d+)/(\d+)-(\d+)-(\d+)\.(.+)$ /gallery?image=$1-$2 last; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment