Revert "Revert "Fixes an issue in feeds generation when SITEURL contains a HTTPS scheme and/or a specific port""

This reverts commit 0b9375a47c926e8a1b58ebb4356e46624914446d.