Encode url for cache key