Search result page redirect ex.com/?s=searchterms to ex.com/searchterms

Write this in your theme’s functions.php.
Hope this helps you out.

function code_search() {
    if ( is_search() &&
         strpos($_SERVER['REQUEST_URI'], '/wp-admin/') === false &&
         strpos($_SERVER['REQUEST_URI'], '/search/') === false ) {
         wp_redirect( get_bloginfo('home') . '/search/' . str_replace(' ', '_', str_replace('%20', '_', get_query_var('s'))));
         exit();
    }
}

add_action('template_redirect', 'code_search');