NameSilo

.htaccess subdomain redirect

Spacemail by SpaceshipSpacemail by 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.
Unstoppable Domains โ€” AI StorefrontUnstoppable Domains โ€” AI Storefront
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
•••
Appraise.net
Escrow.com
Spaceship
Rexus Domain
CryptoExchange.com
Domain Recover
CatchDoms
DomainEasy โ€” Payment Flexibility
DomDB
  • The sidebar remains visible by scrolling at a speed relative to the pageโ€™s height.
Back