Fix redirect if on sub-uri