Took onboard Ali's advice one using urlparse