I wish to rewrite the url of my search page result
Now is
http://www.example.com/search/?location_name=Los+Angeles
and i want to do like that
http://www.example.com/search/LosAngeles
I want to get rid of ?, the location_name and if a city has two words, i don't want to separated by +, but shown as one.
Either in .htaccess or in functions.php
Update : My form is this
<form action="<?php echo esc_url(get_the_permalink($result_page)); ?>" method="get" >
this goes to
http://www.example.com/search/?location_name=Los+Angeles
what if i add to form action onsubmit="return submitAction(this);"
What js i have to put so that the url goes to location_name value e.g. Los Angeles
http://www.example.com/search/LosAngeles
Enable
mod_rewriteand.htaccessthroughhttpd.confand then put this code in your.htaccessunderDOCUMENT_ROOTdirectory: