There is always a question on how to completely redirect some src-domain to another dst-domain properly.
And while there is the simple straightforward way to do so, there are always some dedicated server customers of the web hosting that are trying to reinvent the wheel one more time. And failing miserably.
Here is simple step-by-step instruction on how to redirect src-domain to ds-domain on dedicated web hosting (There are specific instructions for WHM/cPanel and other control panels users that could be found elsewhere).
- Register src-domain, and configure its virtual host just like any other regular virtual host on your dedicated server
- In the DNS zone create a record
1www.src-domain.com. IN CNAME www.ds-domain.com.
- In your virtual host public_html directory create index.php file with the following contents
1234<?phpheader("Location: http://dst-domain.com/");exit;>
This is it – you are done. Enjoy.
0 Comments.