php - Change URL for when this form is processed -


i have form has no action attribute, method of get, , single input field of type text name of q.

when 1 enters 'query' , submits form, url of confirmation page looks http://mysite.com/search.php?q=query.

how can url http://mysite.com/search?q=query

and multi-word searches (like 'query one') http://mysite.com/search?q=query+one ?

all while still navigating confirmation / results page.

how can this? prefer solution not involving .htacess

write following code in htaccess file

rewriteengine on rewriterule ^search\?q\=([^/]*)$ /search.php?q=$1 [l] 

and use http://mysite.com/search action file in form


Comments

Popular posts from this blog

.htaccess - First slash is removed after domain when entering a webpage in the browser -

Automatically create pages in phpfox -

c# - Farseer ContactListener is not working -