Skip to content

Instantly share code, notes, and snippets.

@shabbirbhimani
Last active January 27, 2018 14:07
Show Gist options
  • Save shabbirbhimani/1dd96bc1d450e23c465cc728705d5c40 to your computer and use it in GitHub Desktop.
Save shabbirbhimani/1dd96bc1d450e23c465cc728705d5c40 to your computer and use it in GitHub Desktop.
.htaccess code to Redirect Subdomain to Root Domain
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^SUB\.DOMAIN\.com$ [NC]
RewriteRule ^(.*)$ http://DOMAIN.com [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment