Skip to content

Instantly share code, notes, and snippets.

@ReekenX
Created March 19, 2014 05: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 ReekenX/9635752 to your computer and use it in GitHub Desktop.
Save ReekenX/9635752 to your computer and use it in GitHub Desktop.
Universal redirect to www
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment