set up way of getting mysite.$domain
Posted
by jose silva
on Stack Overflow
See other posts from Stack Overflow
or by jose silva
Published on 2010-03-17T11:08:54Z
Indexed on
2010/03/17
11:11 UTC
Read the original article
Hit count: 219
Hi
I have several domains, only one website and one databse table for each domain.
example: wbesite.us - data from USA goes to database table main_usa wbesite.co.uk - data form UK goes to database table main_uk
Only have one database with name of the website.
Having only one website structured, and having variables like
$sql="select * from main_".$countrycode." where bla..bla..., and many other variables to catch the domain extension, and so on...
Now, instead of having one full website for each domain, how can set a script and wher do I put it in order to detect the domain that the user uses.
In my server root do I create something like website.$domain ?
Something like website OLX but for different purposes.
I hope I made myself clear.
Thank you.
© Stack Overflow or respective owner