I have a search form on my site, so users can search a database of business listings. The form is like this: Then it performs a search and spits out results, the url that it produces in the browser is: I have the following in my .htaccess Options +FollowSymLinks RewriteEngine On RewriteRule (.*).htm$ http://mydomain.com/search.php?q=$1 which works fine if I use <a href="http://www.mydomain.com/searchterm.htm">Searchterm</a> my resulting url is http://www.mydomain.com/searchterm.htm but I don't know how to get it to rewrite properly when $q is from a form input. Any thoughts?