Skip to content

Instantly share code, notes, and snippets.

@anon5r
Last active August 29, 2015 13:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anon5r/10092437 to your computer and use it in GitHub Desktop.
Save anon5r/10092437 to your computer and use it in GitHub Desktop.
Can not be browsing safety internet using Windows XP.
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