using urlencode and urldecode to process the urls