WordPress.org

Make WordPress Core

Opened 5 years ago

Last modified 5 months ago

#30784 new enhancement

Subsites won't show 404 with default permalink structure

Reported by: danhgilmore Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.0.1
Component: Permalinks Keywords:
Focuses: multisite Cc:
PR Number:

Description

On my Multisite (subfolder) installation, I have every site set to use the default (ugly) permalinks. If I go to a subsite and add extra invalid characters after the site name, it displays the site, not a 404 error page.

Example: If I type in domain.tld/sitename/EXTRACHARS it displays the content from domain.tld/sitename, yet keeps the /EXTRACHARS in all the links.

I spoke with Andrea Rennick and she said that this happens because WordPress ignores anything after the sitename because pretty permalinks are not enabled.

This all came up because our Google appliances were crawling millions of invalid URLs because .tld/sitename/EXTRACHARS returns a 200, instead of a 404.

Would it be possible to make it so that an invalid URL would return a 404 instead of ignoring characters beyond the sitename when permalinks are set to default?

Change History (3)

This ticket was mentioned in Slack in #forums by danhgilmore. View the logs.


5 years ago

This ticket was mentioned in Slack in #forums by danhgilmore. View the logs.


5 years ago

#3 @Ipstenu
5 years ago

When tested on a single site, I properly got a messy 404 (and a 'Hey, no 404.html stuff found'). I suspect this is related to the work done to allow for dynamic/ad-hoc sitenames (subdomains, subfolders, mapped domains, and networks) in WP.

Note: See TracTickets for help on using tickets.