
CNC in WordPress search bar
Initially, if you type in the WordPress search bar query, we will get a link like:
https://wp-admin.com.ua/?s=wordpress&x=0&y=0
But you can easily convert the link like this:
https://wp-admin.com.ua/search/wordpress
First way CNC search:
1 2 3 4 5 6 7 | function fb_change_search_url_rewrite() { if ( is_search() && ! empty( $_GET['s'] ) ) { wp_redirect( home_url( "/search/" ) . urlencode( get_query_var( 's' ) ) ); exit(); } } add_action( 'template_redirect', 'fb_change_search_url_rewrite' ); |
The second way to CNC search through htaccess:
1 2 3 | # search redirect RewriteCond %{QUERY_STRING} \\?s=([^&]+) [NC] RewriteRule ^$ /search/%1/? [NC,R,L] |
See also the articleCNC Transliteration WordPress“.

/*

Online tutoring services. List of courses I teach
*/- Basic web design course;
- Site layout;
- General course on CMS WordPress and continuation of the course on template development;
- Website development in PHP.