Changeset 9193
- Timestamp:
- 10/16/2019 08:42:21 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/mu-plugins/pub/wporg-canonical-tweaks.php
r9191 r9193 26 26 27 27 /* 28 * WordPress.org/ feed/* should redirect to WordPress.org/news/feed/*28 * WordPress.org/-specific redirects 29 29 */ 30 if ( 'wordpress.org' === $_SERVER['HTTP_HOST'] && '/feed' === substr( $_SERVER['REQUEST_URI'], 0, 5) ) {30 if ( 1 === get_current_blog_id() ) { 31 31 add_action( 'template_redirect', function() { 32 32 if ( is_feed() ) { 33 wp_safe_redirect( '/news' . $_SERVER['REQUEST_URI'], 301 ); 33 // WordPress.org/feed/* should redirect to WordPress.org/news/feed/* 34 wp_safe_redirect( '/news/feed/' . ( 'feed' !== get_query_var('feed') ? get_query_var('feed') : '' ), 301 ); 35 exit; 36 } elseif ( is_search() ) { 37 wp_safe_redirect( '/search/' . urlencode( get_query_var('s') ), 301 ); 34 38 exit; 35 39 }
Note: See TracChangeset
for help on using the changeset viewer.