Create Virtual / (placeholder?) Subdomains
-
- Posts: 2
- Joined: Thu Dec 10, 2015 6:47 pm
Create Virtual / (placeholder?) Subdomains
Hello Experts,
Background - we are trying to build a cool ERP product :) where user can sign up as a company (business) then once registered invite their team members.
My requirement is to create a separate sub-domains dynamically in the PHP for each company but it will point to the same folder on the server. e.g. if there is folder /xyz for the domain www.abc.com then even if user puts sub-domain.abc.com then he should be able to still access /xyz.
Now, just to add - if I use alias *.abc.com - it might work but then sub-domain.abc.com will always hit my home-page (index page) first then I will have to re-route it to correct page.
Can you please suggest me better way?
Thanks.
Background - we are trying to build a cool ERP product :) where user can sign up as a company (business) then once registered invite their team members.
My requirement is to create a separate sub-domains dynamically in the PHP for each company but it will point to the same folder on the server. e.g. if there is folder /xyz for the domain www.abc.com then even if user puts sub-domain.abc.com then he should be able to still access /xyz.
Now, just to add - if I use alias *.abc.com - it might work but then sub-domain.abc.com will always hit my home-page (index page) first then I will have to re-route it to correct page.
Can you please suggest me better way?
Thanks.