Properly url encode and decode routes