Skip to content

Instantly share code, notes, and snippets.

@shabbirbhimani
Last active Jan 27, 2018
Embed
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 ^(.*)$ http://DOMAIN.com [R=301,L]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment