views:

214

answers:

2

I have a form that submits a search for blogs on my site via GET.

The form works fine, but when submitted, the url on the following page reads ("Find it" is the value of my submit button):

www.example.com/search.php?sub_q=Find+it%21&q=tennis

This just isn't an aesthetically pleasing url. Is there a simple way to exclude the submit button from the URL? I would like the url to look like:

www.example.com/search.php?q=tennis

The search.php doesn't require $_GET['sub_q'] to operate, btw.

+5  A: 

Try not naming your button (remove the name attribute) - it shouldn't be submitted if it doesn't have n name

Marek Karbarz
A: 

See my answer here: http://stackoverflow.com/questions/2367987/seo-php-how-to-convert-form-submit-url-get-method-without-javascript-seo-frien/2382086#2382086

Basically: redirect to an easier-to-spell-out-URI

chelmertz