I have tried several different .htaccess solutions as well as plugins, but nothing seems to be working. I have different links that use an url like this on my WordPress site:
http://www.mydomainname.com/?s=&post_type=schools&general_search=1&general_search_term=Science
How would I rewrite those urls to look like:
http://mydomainname.com/search/science
in the browser?
Thanks!
Here is what I have in the .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
Options +FollowSymLinks -MultiViews
RewriteEngine On
RewriteBase /
RewriteRule ^index.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
RewriteRule ^search/(.+)$ /?s=&post_type=schools&general_search=1&general_search_term=$1 [L,QSA,NC]
</IfModule>
# END WordPress
Simply way
You can use wordpress redirect functions
Try this code in your .htaccess:
EDIT:
This worked for me.
http://wpengineer.com/2258/change-the-search-url-of-wordpress/
Dont forget to add anything before
/search/
to match the url you have.