Fixed test issue when redirecting to relative url