{"action":"opened","issue":{"url":"https://api.github.com/repos/roots/soil/issues/118","labels_url":"https://api.github.com/repos/roots/soil/issues/118/labels{/name}","comments_url":"https://api.github.com/repos/roots/soil/issues/118/comments","events_url":"https://api.github.com/repos/roots/soil/issues/118/events","html_url":"https://github.com/roots/soil/issues/118","id":109467631,"number":118,"title":"Relative urls not working anymore","user":{"login":"schoenkaft","id":1607628,"avatar_url":"https://avatars.githubusercontent.com/u/1607628?v=3","gravatar_id":"","url":"https://api.github.com/users/schoenkaft","html_url":"https://github.com/schoenkaft","followers_url":"https://api.github.com/users/schoenkaft/followers","following_url":"https://api.github.com/users/schoenkaft/following{/other_user}","gists_url":"https://api.github.com/users/schoenkaft/gists{/gist_id}","starred_url":"https://api.github.com/users/schoenkaft/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schoenkaft/subscriptions","organizations_url":"https://api.github.com/users/schoenkaft/orgs","repos_url":"https://api.github.com/users/schoenkaft/repos","events_url":"https://api.github.com/users/schoenkaft/events{/privacy}","received_events_url":"https://api.github.com/users/schoenkaft/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-02T10:22:04Z","updated_at":"2015-10-02T10:22:04Z","closed_at":null,"body":"The relative-urls refactoring in 1.5.0 broke all relative urls for one our clients websites.\r\nThe problem is that our `WP_SITEURL` is different from the url we're requesting from. This is done because we're accessing the admin from a single server (non-https), while the front part of the system is access thru a load balancer and hosted on multiple servers (https, with CloudFront on top of it).\r\n\r\n```\r\nWP_HOME=https://<domain>.net\r\nWP_SITEURL=http://admin.<domain>.net/wp\r\n```\r\n\r\nThis means that `$hosts_match = $site_url['host'] === $url['host'];` will never match, and therefore return false and will not be made relative.\r\n\r\nAbsolute url's wouldn't be a big problem, if it wouldn't be for the fact that our `WP_SITEURL` is non-https (since we don't have a certificate for it), while the visitor facing part of the website is completely https. This means that the assets asset urls are `http://<domain>.net/<asset>`, and they get blocked by the browser since they're not https. So we're actually relying on relative url's, since they don't care about protocol. \r\n\r\nMy solution for now is to revert to 1.4.0 or disable the $hosts_match.\r\nAnother solution for me would be to strip the protocol from the `return $input;`, like `return preg_replace('#^https?:#', '', $input);`, so the absolute url becomes `//<domain>.net/<asset>`.\r\n\r\nI guess this is sort of an edge case, but with the current version (1.5.0) stuff is not working for me anymore."}}