Redirecting sub-domain.
Firstly, I have done a search and could not find exactly what I wanted, so I thought I would start a new thread.
I am wondering if anyone could tell me how to redirect a sub domain to an external website. I have many sub domains all of which need to go to separate sites, i.e.:
a.mydomain.com redirects to a.com
b.mydomain.com redirects to b.com
etc.
I have found the following but I am not sure how to use it:
<?php
header( 'Location: http://www.domain.com' ) ;
?>
What do I cann the file that this goes in?
If there's a better way than the above, I'm all ears.
Thanks in advance,
Ryan.
FREE course:
â¶ï¸ Discover how to create a profitable website or a blog