Trim urls to avoid duplicates caused by stupid clients.