Put the query string on the right url