Opened 11 years ago
Closed 10 years ago
#28164 closed defect (bug) (duplicate)
Multisite (subfolders) causes 500 Internal Server Error on non-existing subfolders of wp-content, wp-admin and wp-includes
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 3.7.1 |
Component: | Rewrite Rules | Keywords: | |
Focuses: | multisite | Cc: |
Description
When using Multisite (subfolder install), visiting /wp-content/not-a-folder/
returns a 500 Internal Server Error instead of a 404 Not Found.
Steps to reproduce
- Install Multisite with subfolders. No plugins, default theme (twentyfourteen in my case)
- Use the generated
.htaccess
- Visit
<your-install>/wp-content/not-a-folder/
Expected
404 Not Found instead of 500 Internal Server Error
Additional information
<your-install>/wp-content/not-a-folder
(without trailing slash) DOES return the 404, but doesn't show the theme / WordPress (just a plain Apache 404)- Error log reports too many redirects
- The problem seems to be here:
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
, since it works properly without this line of code (as well as removing the question mark)
Setup
For this example I am using MAMP on my Mac, but I have seen this in the wild on several setups and servers (all Apache).
WP: 3.9 and below (lowest tested: 3.7.1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
I'm able to reproduce this error on a production site running on a linux server.
Here is the error message reported in the error log: