Strip url string before doing anything with it