[wp-trac] [WordPress Trac] #50926: Page 2 onwards of any wp-sitemap.xml URL will result in a 404 redirect

WordPress Trac noreply at wordpress.org
Wed Aug 12 06:55:49 UTC 2020


#50926: Page 2 onwards of any wp-sitemap.xml URL will result in a 404 redirect
--------------------------+-----------------------------
 Reporter:  GamerZ        |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Sitemaps      |    Version:
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Works: https://lesterchan.net/wp-sitemap-posts-page-1.xml
 Broken: https://lesterchan.net/wp-sitemap-posts-page-2.xml

 Notice that the broken URL is redirected to https://lesterchan.net/wp-
 sitemap-posts-page-2.xml/page/2

 I suspect it is due to Line 475 to Line 477 of wp-includes/canonical.php

 As after removing the lines it works
 {{{#!php
 <?php
 if ( $paged > 1 ) {
     $addl_path .= user_trailingslashit(
 "$wp_rewrite->pagination_base/$paged", 'paged' );
 }
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50926>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list