Make WordPress Core

Opened 5 years ago

Last modified 5 years ago

#15083 closed defect (bug)

Apache rewrite loop on subdirectory install — at Initial Version

Reported by: wpmuguru Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version:
Component: Multisite Keywords: has-patch commit
Focuses: Cc:


If a requested file under the wp-content directory does not exist, this creates a rewrite loop for the file. Let's say /subsite/wp-content/themes/theme-x/images/abc.gif does not exist, then the rewrite that is invoked is:

RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]

The first rewrite pass rewrites the url to /subsite/wp-content/themes/theme-x/images/abc.gif which also does not exist. However, the rewritten request still matches the rewrite rule because the question mark ^([_0-9a-zA-Z-]+/)? makes it so the rewrite rule also applies to /wp-content/themes/theme-x/images/abc.gif.

Change History (1)

@wpmuguru5 years ago

Note: See TracTickets for help on using tickets.