Subdomains

theuros

New member
Joined
May 20, 2016
Messages
1
I have a hosting with three domains and each domain has it's own public_html folder.

So my structure is like:

/domains/domain1.com/public_html/
/domains/domain2.com/public_html/
/domains/domain3.com/public_html/

I created various sub domains for domain2.com and domain3.com . For each subdomain a folder with same name is created in public_html

My questions is: how can i point all subdomains from domain2.com and domain3.com to root folder of domain1.com? => /domains/domain1.com/public_html/

Thanx
 
A fast way should be craete an index.php in each of the subdomain folder with this content:
Code:
<?php

  header("Location:http://www.domain1.com");

?>

Regards
 
Wouldn't adding the subdomains as 'Alias' pointers to Domain1 do the job? Or do I misunderstand the question.
 
Back
Top