[wp-trac] [WordPress Trac] #17708: iis web.config rule 5 not working
WordPress Trac
wp-trac at lists.automattic.com
Mon Jun 6 16:02:49 UTC 2011
#17708: iis web.config rule 5 not working
--------------------------+------------------------------
Reporter: eduplessis | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: IIS | Version: 3.1
Severity: normal | Resolution:
Keywords: needs-patch |
--------------------------+------------------------------
Comment (by eduplessis):
Here is the details for the workaround :
The problem arises when using multi-site in wordpress.
Once wordpress is installed and run on an IIS server, we can make WP to
generate the rewrite rules to be used for IIS using this page: http
://worpress-website.com/wp-admin/network/setup.php
Usually, you just have to copy & paste the rules into the web.config file,
BUT there is one rule not working well. Here is what we must replace to
make it work :
Original generated rule :
{{{
<rule name="WordPress Rule 5" stopProcessing="true">
<match url="^[_0-9a-zA-Z-]+/(wp-(content|admin|includes).*)"
ignoreCase="false" />
<action type="Rewrite" url="{R:2}" />
</rule>
}}}
Modified (working) rule :
{{{
<rule name="WordPress Rule 5" stopProcessing="true">
<match url="^[_0-9a-zA-Z-]+/(wp-content.*|wp-admin.*|wp-includes.*)"
ignoreCase="false" />
<action type="Rewrite" url="{R:1}" />
</rule>
}}}
That's about it! I'm pretty sure there is another way to get the rule
working. Maybe just changing "R:2" to "R:1" without modifying the
parenthesis would also work.
Problem was that, with the original rule, WP redirected to "admin" instead
of "wp-admin" which leads to a 404 page not found.
This was tested using WordPress 3.1 on IIS 7 and Windows Azure.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17708#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list