Parse, merge and modify URLs while maintaining integrity of all parts.