Repository navigation
WP_HOME will not always match SERVER_NAME - #56
Conversation
|
I'm seeing this [staging] issue on a current project. Give me anything you want to test and I can put it on here to see if it works. |
|
This seems noteworthy... On the staging environment, PHP's On the production environment, the The reason this is worth noting is that |
Worth noting that this only occurs when Evolution::getHostname() amd $_SERVER[HTTP_HOST] are *not* equal
|
@ericrasch Implemented a workaround using output buffering (mostly copied from Genesis) that only kicks in when the constructed hostname doesn't match |
|
@EvanK you fixed this by modifying the following lines: |
|
I still feel dirty using output buffering + str_replace, but I genuinely don't see a better solution. The upside, as previously stated, is that it only kicks in when the detected hostname (from I've also confirmed that varnish uses the same http host during hashing, so we shouldn't see any overlapping caching |
|
Since I'm doing a minor version bump anyway (for #59), merging this one too |
WP_HOME will not always match SERVER_NAME
While #37 has fixed most url-related issues, it has some lingering side-effects:
production.$DOMAINwill have all links pointing to$DOMAIN(orwww.$DOMAIN, whichever is the canonical)$BRANCH.staging.$DOMAINwill have all links pointing tostaging.$DOMAINThere doesn't seem to be a good solution to this, without filtering all content through output buffering.
We could implement this so that output buffering is only turned on when
WP_HOMEand$_SERVER[SERVER_NAME]aren't equal, but that's still a hack I'd like to avoid..