Skip to content

Instantly share code, notes, and snippets.

@lyquix-owner
Created June 3, 2016 20:56
Show Gist options
  • Save lyquix-owner/8c3ff540c6e09250955aa4d2a404c29e to your computer and use it in GitHub Desktop.
Save lyquix-owner/8c3ff540c6e09250955aa4d2a404c29e to your computer and use it in GitHub Desktop.
Redirect domain to www subdomain
# Redirect domain to www #
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www.example.com$ [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment