fix work with relative urls when there are few redirects