HTTP redirects logic overhaul