Skip to content

Instantly share code, notes, and snippets.

@yatil
Forked from meaku/.htaccess
Created May 29, 2013 12:09
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 yatil/5669822 to your computer and use it in GitHub Desktop.
Save yatil/5669822 to your computer and use it in GitHub Desktop.
# HTTP(S) Stuff
# Redirect all users except IE 5-8 & Android < 4 to HTTPS
RewriteCond %{SERVER_PORT} !^443$
RewriteCond %{HTTP_USER_AGENT} !MSIE\ [5-8]
RewriteCond %{HTTP_USER_AGENT} !Android.*(Mobile)?\ [0-3]
RewriteRule (.*) https://%{HTTP_HOST}/$1 [L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment