Opened 12 years ago
Closed 11 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: | Harold Angenent | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Rewrite Rules | Version: | 3.7.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | multisite |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
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: