How can I pass proper querystring when Search from Drupal using my custom search box? I have this search form in my drupal site.

&lt;form id="mysearch" method="get" action="&lt;?php echo $base_url.'/search/node/'; ?&gt;"&gt;
   &lt;input type="text" maxlength="150" id="search" name="s" class="input"&gt;
   &lt;input type="submit" value="Search" class="button"&gt;
&lt;/form&gt;


I have problem is that when I am submit the form it will pass the query like that

http://mysite.com/search/node/?s=xyz


Here I would like to change the URL something like this to search in my site.

http://mysite.com/search/node/xyz


Can anyone help me how can i achieve this thing.

I have put this code for URL Change:

$("#adminbarsearch").submit(function(e) {
    $url = $("#adminbarsearch").attr("action") + $( "input:first" ).val();
    e.preventDefault();
    window.location.href = $url;
});


Instead of this Can we change the URL by using the .htaccess
If you use the default search block for Drupal, it will give you the functionality you need.

EDIT: Go to Structure > Blocks and enable your Search Form Block by adding it to a region. 

If you perform a search using your default search block, it will redirect to a path in the format /search/node/QUERY where QUERY is what you are searching for.

By default the search form outputs (for example):

&lt;div class="block-wrapper"&gt;
    &lt;div class="block-container"&gt;
        &lt;div class="block"&gt;
            &lt;div class="content"&gt;
                &lt;form action="/" method="post" id="search-block-form" accept-charset="UTF-8"&gt;
                &lt;div&gt;
                    &lt;div class="container-inline"&gt;
                        &lt;h2 class="element-invisible"&gt;Search form&lt;/h2&gt;
                            &lt;div class="form-item form-type-textfield form-item-search-block-form"&gt;
                                &lt;label class="element-invisible" for="edit-search-block-form--2"&gt;Search&lt;/label&gt;
                                &lt;input title="Enter the terms you wish to search for." type="text" id="edit-search-block-form--2" name="search_block_form" value="" size="15" maxlength="128" class="form-text"&gt;
                            &lt;/div&gt;
                            &lt;div class="form-actions form-wrapper" id="edit-actions"&gt;
                                &lt;input type="submit" id="edit-submit" name="op" value="Search" class="form-submit"&gt;
                            &lt;/div&gt;
                            &lt;input type="hidden" name="form_build_id" value="form-4gEUIDHcVH7lHHH3JpkfkVs9xBmPhHXdDQAMFMF9dHA"&gt;
                            &lt;input type="hidden" name="form_token" value="afNo5gRQlaauXmqeZYDf80o5dEwKlg0VP6U-Ir8-p6k"&gt;
                            &lt;input type="hidden" name="form_id" value="search_block_form"&gt;
                        &lt;/div&gt;
                    &lt;/div&gt;
                &lt;/form&gt;
            &lt;/div&gt;
        &lt;/div&gt;
    &lt;/div&gt;
&lt;/div&gt;


Now if I search for "test", it redirects to /search/node/test