Mod rewrite question
-
I want to learn how to use the mod rewrite functions provided by wordpress. I started off by making an substitute rewrite for search, but it does not work. any ideeas, as the documentation for the API is poor in details.
thanks ??this is the code:
global $wp_rewrite;
add_action(‘generate_rewrite_rules’, ‘feed_dir_rewrite’);
function feed_dir_rewrite($wp_rewrite) {
$feed_rules = array(
‘mysearch/(.+)/?$’ => ‘index.php?s=$1’,
);$wp_rewrite->rules = $feed_rules + $wp_rewrite->rules;
}
- The topic ‘Mod rewrite question’ is closed to new replies.