MS Requires Client Information to Load Files
|Reported by:||filosofo||Owned by:||filosofo|
When installed as multi-site, WP in ms-settings.php tries to parse the Host header request to determine which domain is requested. If none, it prints a redirecting Location header and exits.
This is problematic if you are loading WP but not using a client that sends headers to the server; for example, if you have another app on the same server that tries to include wp-load.php directly.
<?php include '/path/to/wp/wp-load.php'; // let's do some stuff with WP programatically...
The above aborts in MS as it tries to redirect the nonexistent requesting client to the main blog's front page.
The problems I see with this:
- wp-load.php is supposed to provide a means of circumventing the template printing, so it shouldn't assume a typical browser client is making the request
- wp-load.php can be used this way on non-MS setups
- In general, it's a bad jumble of MVC.
Currently I'm not sure what the best route is to fix this, but I will try to come back later with a solution.
Change History (17)
22 months ago
- Component changed from Multisite to Bootstrap/Load
- Focuses multisite added