I am trying to convert my URL in to SEO Friendly url. I do not have much knowledge about htaccess rewrite rules, URL is:
https://www.zesteve.com/search.php?loc=Guntur&q=manjunath-cake-shop
the URL should be
https://www.zesteve.com/Guntur/manjunath-cake-shop
I have tried this:
RewriteEngine On
RewriteCond $1 ^search
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ search.php?q=$1 [L,QSA]
I got the result as
https://www.zesteve.com/search?loc=Guntur&q=manjunath-cake-shop
Edit
I am using jquery to redirect
window.location.href = 'search?loc=' + location[0] + '&q='+ search_term;