﻿id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc
8039,WP2.7 Not Respecting Custom Rewrite Rule,GamerZ,,"In WP2.7 Beta 1, apparently the custom rewrite rule is not respected.

I have added in a custom rewrite rule to WP_Rewrite. This rewrite rule is exactly the same as in WordPress 2.6 and it is at the top of the ""rules"" array.
{{{
#!php
[([0-9]{4})/([0-9]{1,2})/([0-9]{1,2})/([^/]+)/email/?$] => index.php?year=$matches[1]&monthnum=$matches[2]&day=$matches[3]&name=$matches[4]&email=1
}}}

When I go to http://yoursite.com/wordpress/2008/10/11/asdsadasd/email/, it will redirect me to http://yoursite.com/wordpress/2008/10/11/asdsadasd/ for no reason.

""email"" is already been added to the public_query_vars
{{{
#!php
add_filter('query_vars', 'email_variables');
function email_variables($public_query_vars) {
	$public_query_vars[] = 'email';
	return $public_query_vars;
}
}}}

I have also placed a template redirect to take care if email=1
{{{
#!php
add_action('template_redirect', 'wp_email');
function wp_email() {
	if(intval(get_query_var('email')) == 1) {
		include(WP_PLUGIN_DIR.'/wp-email/email-standalone.php');
		exit;
	}
}
}}}

In WP2.6, the exact same code works fine, but I have no idea why in WP2.7, it does not work.",defect (bug),closed,normal,2.7,Permalinks,2.7,normal,fixed,"rewrite, rules, htaccess",
