take care of empty query case when rewriting ?s=... to /search