[BUGFIX] Make sure relative URL receives a proper host part for errorpage