WordPress.org

Make WordPress Core

Opened 4 years ago

Last modified 4 years ago

#15083 closed defect (bug)

Apache rewrite loop on subdirectory install — at Version 2

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

Description (last modified by wpmuguru)

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 /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 (3)

@wpmuguru4 years ago

comment:1 @wpmuguru4 years ago

I don't have IIS to work with so I did not patch those rules. If someone with IIS could makes similar changes to the IIS rules, that would be great.

comment:2 @wpmuguru4 years ago

  • Description modified (diff)
Note: See TracTickets for help on using tickets.