Let me see if I understand Your problem.
Both the sites run on the same server-site in the same applicaton? Just different domain-names (can be set in the host-header).
The easiest way of solving Your problem is to save all domain-names into a db-table and have that UniqueID as reference in all other db-tables
simple tablestructure:
SITES
+--------------+
Site_SiteID int PK auto_increment
Site_Domain varchar(255)
SITECONTENTS
+--------------+
SC_SiteContentID int PK auto_increment
SC_ContentHeader varchar(255)
SC_ContentText text
SC_SiteID int indexed
Constraints
Site_SiteID 1 --> n SC_SiteID
/botNET