remove trailing ? from url

when no parameters are passed.