i am using this form to search on my site
<form id="search" action="/search.php" method="get">
<input type="text" onfocus="this.value='';this.style.color='black'" value="Search here" name="tag" id="search-text" />
<input type="image" src="/search-new.gif" alt="Search" id="search-submit" />
</form>
when i search with it i get a url like this
http://www.mysite.com/search.php?tag=query
but i am using rewrite rule in my site and i have url like this
http://www.mysite.com/search/query
This shows the same results
what i want is when user search
instead of showing this url
http://www.mysite.com/search.php?tag=query
it should show my rewrite rule url
http://www.mysite.com/search/query
How i Cant Do that?
I would override the onSubmit() event of the form and redirect myself with javascript by changing window.location to the url you like (just concat the query value to the end)
here’s a quick and super dirty example: