In Wordpress, I have set the permalink structure like this: /%category%/%postname%
After creating a custom search page, I now have the following URL:
http://mypage.com/search?foo1=bar&foo2=&foo3=&foo4=
I have two questions:
1) How can I transform this url so that I get to e.g. http://mypage.com/search/foo1/bar
?
2) Is there a way I can remove the "unused" parameters? (&foo2=&foo3=&foo4=
)
I found this post, pointing me to parse_request function in Wordpress, and this post talking about mod_rewrite. But not quite sure how to proceed, or what method is better to use.