Dynadot โ€” .com Registration $8.99

.htaccess subdomain redirect

Spaceship Spaceship
Watch

Tree

Established Member
Impact
9
How can I redirect a subdomain using .htaccess? I've Googled, and found nothing relevant. I suspect it has something to do with mod_rewrite?
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
AfternicAfternic
Something like this?
Code:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^sub\.domain\.com
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301, L]
 
0
•••
I'll try it. Thanks 2v. :)
 
0
•••
Dynadot โ€” .com Registration $8.99Dynadot โ€” .com Registration $8.99
Appraise.net
Unstoppable Domains
Domain Recover
NameMaxi - Your Domain Has Buyers
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back