Skip to content

Instantly share code, notes, and snippets.

Last active Jan 27, 2018
What would you like to do?
.htaccess code to Redirect Subdomain to Root Domain
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^SUB\.DOMAIN\.com$ [NC]
RewriteRule ^(.*)$ [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment