Clean URLs for search query?

I think the problem is that you’ve created an HTML form with GET method, which automatically opens the URL that way you specified as the result. If you want to submit your search query like the desired one, you should hack the form with some JavaScript to call your good-looking URL like this:

<form method="get" action="/search/" onsubmit="return false;">
<input type="search" name="q" value="querystring" />
<input type="submit" onclick="window.location.href=this.form.action + this.form.q.value;" />
</form>

Leave a Comment