[wp-trac] [WordPress Trac] #25106: web.config for multisite configurations on IIS7
WordPress Trac
noreply at wordpress.org
Wed Aug 21 00:43:28 UTC 2013
#25106: web.config for multisite configurations on IIS7
--------------------------+----------------------------------------
Reporter: mrevets | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 3.6
Severity: normal | Keywords: needs-testing dev-feedback
--------------------------+----------------------------------------
The code that WordPress gives me for the web.config is incorrect. I
downloaded the new 3.6 and this issue happened. I found the issue and
solved it but wanted to let you know of this error as not many people run
multisites on IIS7. So the rewrite code that was the issues is the
following and was Rule 2
{{{
<rule name="WordPress Rule 2" stopProcessing="true">
<match url="^wp-admin$" ignoreCase="false" />
<action type="Redirect" url="wp-admin/" redirectType="Permanent" />
</rule>
}}}
what i can tell this is trying to do is if a user types in just
"domain.com/wp-admin" that it would redirect them to "domain.com/wp-
admin/" but the desired results did not happen. the above code would
redirect you to "domain.com/domain.com/wp-admin/" which obviously would
cause issues after the user logs in as the redirect_to would point to
http://domain.com./domain.com/wp-admin/ which would cause an endless loop.
To fix this problem you need to add a / to the beginning of the rewrite
like so
{{{
<rule name="WordPress Rule 2" stopProcessing="true">
<match url="^wp-admin$" ignoreCase="false" />
<action type="Redirect" url="/wp-admin/" redirectType="Permanent" />
</rule>
}}}
that extra / before the wp-admin/ forces it to the root of the site.. now
i am not sure what this would do to a site in a sub directory but im not
in a sub directory so not an issue for me.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/25106>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list