Minor change

Minor change to take into account if the redirect URL ends with "/" or
not.