Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@fernandiez
Created May 31, 2016 10:18
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 fernandiez/1ed8aee5b3191927bd6054ec851d7aa0 to your computer and use it in GitHub Desktop.
Save fernandiez/1ed8aee5b3191927bd6054ec851d7aa0 to your computer and use it in GitHub Desktop.
Domain 301 redirection from without www to www domain
# Domain 301 redirection from without www to www
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain.com [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [L,R=301]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment