Skip to content

Instantly share code, notes, and snippets.

@steveosoule
Created November 30, 2012 00:33
Show Gist options
  • Select an option

  • Save steveosoule/4172917 to your computer and use it in GitHub Desktop.

Select an option

Save steveosoule/4172917 to your computer and use it in GitHub Desktop.
Force WWW on Non-Secure URLS and Keep Request URI
RewriteCond %{HTTPS} !=on
RewriteCond %{HTTP_HOST} ^domain\.com
RewriteRule ^ http://www.domain.com%{REQUEST_URI} [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment