added relative path redirection support.