Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- RewriteCond %{REQUEST_URI} ^/$
- RewriteCond %{QUERY_STRING} ^s=(.+)$
- RewriteRule .* /searchmyblog/%1/? [R,L]
- if ( ! function_exists( 't5_search_base' ) )
- {
- register_activation_hook( __FILE__ , 't5_flush_rewrite_on_init' );
- register_deactivation_hook( __FILE__ , 't5_flush_rewrite_on_init' );
- add_action( 'init', 't5_search_base' );
- function t5_search_base()
- {
- $GLOBALS['wp_rewrite']->search_base = 'searchmyblog';
- }
- function t5_flush_rewrite_on_init()
- {
- add_action( 'init', 'flush_rewrite_rules', 11 );
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement