We have a unique WordPress installation and the front page is an iframe that needs to redirect to an address which depends on the URL it’s being accessed from (more specifically, it depends on the subdomain).
Let’s say, if the address is :
<subdomain>.<Domain>
then the iframe should redirect to:
<subdomain>.<OtherDomain>
ex:
chc.mynewdomain.com
should contains an iframe redirecting to:
chc.myolddomain.com
The questions are:
1- how to have all subdomains go to that unique wordpress install?
2- how to parse the subdomain in the underlying WordPress (PHP) code, possibly check against a white list of subdomains, and build up dynamically the iframe URL?
To have all subdomains go to the same wordpress install: