Make WordPress Core

Opened 4 years ago

Closed 4 months ago

#20203 closed enhancement (duplicate)

To return 404 page when user request not existing category and existing at once (in URL)

Reported by: egorpromo Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3.1
Component: Taxonomy Keywords:
Focuses: Cc:


I have category 'category1' with posts in it. I want to get posts from 'caegory1' and not existing category 'not_existing'.
if I use URL like 'http://mysite.com/category/category1+notexisting' I get normal archive page but this is a page without post because there are no posts in 'category1' and 'not_exists' at once.
But maybe it is better to return 404 page? Because it produces additional duplicate pages for search engines like google.

Change History (4)

comment:1 @egorpromo4 years ago

Not duplicate page but dummy page whitout meaning. This page must not be in index of search engines if it have been found miraculously there

Last edited 4 years ago by egorpromo (previous) (diff)

comment:2 @SergeyBiryukov3 years ago

Related/duplicate: #11348

comment:3 @nacin21 months ago

  • Component changed from General to Taxonomy

comment:4 @boonebgorges4 months ago

  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

If the issue being reported here is that http://mysite.com/category/category1+notexisting queries for posts that match *both* terms (rather than neither term), then it's not a bug, but expected behavior.

If the issue being reported is that an archive with no posts returns 200 rather than 404, then this is indeed a duplicate of #11348.

Note: See TracTickets for help on using tickets.