Redirect a subdomain?

benny92000

New Member
k heres the deal i hve direct admin panel. i want to redirect subdomain x.domain.net to domain.net/?styleidx. i cant do it through my panel. How can i do it? i heard i need to make a .htaccess file on my forum root and add sme coding?? btw im on vb 3.7.4
 
Here is the basic code you need to do what you asked. You just need to create a .htaccess or add it to an existing one, probably at the top of the file.


Code:
Options +FollowSymLinks
Options +SymlinksIfOwnerMatch

RewriteEngine on
RewriteCond %{HTTP_HOST} ^subdomain.website.com$ [OR]
RewriteCond %{HTTP_HOST} ^www.subdomain.website.com$
RewriteRule ^(.*)$ [url]http://http://www.website.com/~subdomain/[/url] [R=301,L]
 
Back
Top