## Changing search URL to something other than “search”

Question

Why is it that when I attempt to change the URL for searches, it breaks if set to anything other than search?

function bfm_pretty_search () {

if (is_search() && !empty(\$_GET['s'])) {
wp_redirect(home_url('/search/').urlencode(get_query_var('s')));
exit();
}

}

So, instead of the url looking like mydomain.com/search/query, I’d like it to be: mydomain.com/results/query, but it doesn’t work with anything other than “search”… why?