Opened 8 years ago
Closed 6 years ago
#38275 closed defect (bug) (duplicate)
Single wildcard character in .htaccess requests any page
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | |
Component: | Permalinks | Keywords: | |
Focuses: | Cc: |
Description
For example, if the site is http://www.mysite.com, requesting http://www.mysite.com/s will redirect to a permalink beginning with 's'. This sends the user to an unexpected page.
This request should redirect to 404 when the page 'http://www.mysite.com/s' doesn't exist.
In the WP installation folder, the following .htaccess rewrite rule causes this problem:
RewriteRule . /index.php [L]
Change History (3)
Note: See
TracTickets for help on using
tickets.
Hi @martinthehorrible, welcome to Trac! Thanks for the report.
This is actually a feature introduced a long time ago, WordPress is trying to guess the correct permalink:
https://developer.wordpress.org/reference/functions/redirect_guess_404_permalink/
If you're looking for a way to disable it, there's a ticket for that: #16557.