php - How to automatically parse a subdomain with WordPress -
we have unique wordpress installation , front page iframe needs redirect address depends on url it's being accessed (more specifically, depends on subdomain).
let's say, if address :
<subdomain>.<domain>
then iframe should redirect to:
<subdomain>.<otherdomain>
ex: chc.mynewdomain.com
should contains iframe redirecting to:
chc.myolddomain.com
the questions are:
1- how have subdomains go unique wordpress install?
2- how parse subdomain in underlying wordpress (php) code, possibly check against white list of subdomains, , build dynamically iframe url?
to have subdomains go same wordpress install:
- first, setup wildcard domain entry. procedure varies depending on dns host
- then setup wild card entry in httpd config (typically involves adding * in hostname)
- as handling in wordpress, depends trying do. scenario want different page every subdomain have enable wordpress multi site multiple site. then, have install domain mapping plugin. url describes here: http://wp.tutsplus.com/tutorials/wordpress-multisite-beyond-basics-essentials-and-domain-mapping/
Comments
Post a Comment