Add basic subroutine to canonicalize URLs