Ticket #19876: bare-category-redirect.diff
File bare-category-redirect.diff, 569 bytes (added by , 13 years ago) |
---|
-
wp-includes/canonical.php
426 426 * location on success. 427 427 */ 428 428 function redirect_guess_404_permalink() { 429 global $wpdb ;429 global $wpdb, $wp_rewrite; 430 430 431 if ( preg_match( '#^[^%]+%category%#', $wp_rewrite->permalink_structure ) 432 && $cat = get_category_by_path( $_SERVER['REQUEST_URI'] ) 433 ) { 434 return get_term_link( $cat ); 435 } 436 431 437 if ( !get_query_var('name') ) 432 438 return false; 433 439