encode url properly for ordered results