[wp-trac] [WordPress Trac] #57858: If permalink structure is set to /%category%/%postname% , WordPress will match a /0/ path as a category archive

WordPress Trac noreply at wordpress.org
Thu Mar 9 08:53:12 UTC 2023


#57858: If permalink structure is set to /%category%/%postname% , WordPress will
match a /0/ path as a category archive
--------------------------------------------+------------------------------
 Reporter:  krdevio                         |       Owner:  (none)
     Type:  defect (bug)                    |      Status:  new
 Priority:  normal                          |   Milestone:  Awaiting Review
Component:  Rewrite Rules                   |     Version:  6.1.1
 Severity:  normal                          |  Resolution:
 Keywords:  has-testing-info needs-testing  |     Focuses:
--------------------------------------------+------------------------------

Comment (by krdevio):

 Replying to [comment:2 kalpeshh]:
 > I am getting proper 404 for all the cases you mentioned except below,
 >
 >
 > `example.com/0/` will properly resolve to the `home page` and does not
 give 404
 >
 > `/0/some-post-name` will properly resolve to `some-post-name` page
 regardless of in which category it belongs
 >
 >

 I just retested, you know what you are correct. My apologies My permalink
 settings were not exactly
 `/%category%/%postname%`, and testing that it was fine as you said.

 With that said it might still be a bug: The exact permalink setting I had
 was `/%category%/%postname%.html` (.html at the end). I guess adding the
 `.html` at the end causes /0/ to match as mentioned initially.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57858#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list