set url correctly when searching