I have used the nicename permalinks for some time and it works like a charm. I use the /%postname%/ structure.
I have written a plugin that:
add_action('template_redirect','miljo_redirect');
function netwrok_redirect()
{
if(isset($_GET['network'])
{
include(TEMPLATEPATH."/network.php");
exit();
}
}
How can i make the www.wordpressblog.com/?network rewrite to www.wordpressblog.com/network/
AND make the template_redirect detect the /network tag?
I've tried to resolve the rewrite with:
add_action('generate_rewrite_rules','network_add_rewrite_rule');
function network_add_rewrite_rule($wp_rewrite)
{
$new_rules = array('natverk/(.+)' => 'index.php?natverk='.$wp_rewrite->preg_index(1) );
$wp_rewrite->rules = $new_rules + $wp_rewrite->rules;
}
But it doesnt work.