Last active
August 29, 2015 13:58
-
-
Save anon5r/10092437 to your computer and use it in GitHub Desktop.
Can not be browsing safety internet using Windows XP.
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
server { | |
set $browse_os ""; | |
if ($uri !~ ^/support_for_windows_xp_has_ended){ | |
set $browse_os "X"; | |
} | |
if ($http_user_agent ~ "Windows NT 5\.[12]") { | |
set $browse_os "${browse_os}P"; | |
} | |
if ($browse_os = "XP"){ | |
return 302 /support_for_windows_xp_has_ended; | |
} | |
location /support_for_windows_xp_has_ended { | |
default_type text/plain; | |
echo "Why are you still using Windows XP ?"; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment