redirecting to correct url