grega2
Forum Replies Created
-
I have resovled it myself.
I have enabled sunrise in wp-config. Then add a script to sunrise.php to override HTTP_HOST.
I made it dynamic since we have many websites. When you visit api.domainxy.com it automatically shows you domainxy.com.
$re = '/(?:api\.)(.*)/m'; $str = $_SERVER['HTTP_HOST']; preg_match_all($re, $str, $matches, PREG_SET_ORDER, 0); if ($matches && $matches[0][1] != "") { $_SERVER['HTTP_HOST'] = $matches[0][1]; }This steps (1,2) are not helpful… They cannot be working since you would need to tell WP which site to load, but you dont. Its just handles redirects.
Ill check plugins, but Iam sure that there has to be a simple code solution to that.
I would only need to tell WP which site to load if the url cannot be matched with any existing blogs/sites….
Yes api subdomain act as a mirror. But you have to tell WP that api.domain1.com is a mirror for domain1.com. This is the main problem – i do not know how to do that.
If I add api subdomain to server it redirects you to “master” domain.
When you go to api.domain1.com it redirects you to masterdomain.com/wp-signup.php?new=api.domain1.com. But api.domain1.com should be a mirror of domain1.com.
Hi,
I know all about how to do that… But the problem is we are having WordPress Multisite network. I do not know how to attach additional subdomain to each site of the network. Thats the main problem since API needs to be called thru the appropriate domain…
Iam having the same problem… Plugin stopped working after 2.0.2 update.