Don't depend on parse_url() as it fails with corrupted urls. Instead use FULL_BASE_URL to prepare an absolute path. Fixes #3270