Skip to content

Instantly share code, notes, and snippets.

@QB
Created January 28, 2013 02:22
Show Gist options
  • Save QB/4652405 to your computer and use it in GitHub Desktop.
Save QB/4652405 to your computer and use it in GitHub Desktop.
Ruby で、アクセスしてきたIEユーザをYahoo!へと弾き飛ばす。
print "Location: http://yahoo.co.jp\n" if request.env["HTTP_USER_AGENT"].match(/MSIE/)
# ここまででIEは弾かれる。以下、通常の処理を書く。
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment