Skip to content

Instantly share code, notes, and snippets.

@griiettner
Created July 12, 2013 01:02
Show Gist options
  • Save griiettner/5980613 to your computer and use it in GitHub Desktop.
Save griiettner/5980613 to your computer and use it in GitHub Desktop.
.htaccess to redirect no www to www
# Redirect non-www urls to www
RewriteCond %{HTTP_HOST} !^www\.yoursite\.com
RewriteRule (.*) http://www.yoursite.com/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment