adjust redirects to respect possible subdirectory configuration