Skip to content

Instantly share code, notes, and snippets.

@5iDS
Created March 19, 2014 02:20
Show Gist options
  • Save 5iDS/9634349 to your computer and use it in GitHub Desktop.
Save 5iDS/9634349 to your computer and use it in GitHub Desktop.
Redirecting www to non-www with .htaccess
RewriteEngine On
RewriteCond %{HTTP_HOST} !^my-domain\.com$ [NC]
RewriteRule ^(.*)$ http://my-domain.com/$1 [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment