Encode the URI