updated url check for bad request redirect