Skip to content

Instantly share code, notes, and snippets.

@tribulant
Created May 30, 2015 12:28
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 tribulant/9c29bd4b04da17bb8a8d to your computer and use it in GitHub Desktop.
Save tribulant/9c29bd4b04da17bb8a8d to your computer and use it in GitHub Desktop.
.htaccess redirect to www
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTP_HOST} ^domain\.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
</IfModule>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment