[wp-trac] [WordPress Trac] #54161: WordPress destroy iis web.config when using "location" config.
WordPress Trac
noreply at wordpress.org
Wed Sep 22 15:53:05 UTC 2021
#54161: WordPress destroy iis web.config when using "location" config.
---------------------------+-----------------------------
Reporter: foxontherock | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Rewrite Rules | Version: 5.8.1
Severity: critical | Keywords:
Focuses: |
---------------------------+-----------------------------
When wordpress doesn't find rewrite rulres, it tries to add them, and it
works correctly.
BUT
If we use the "location" in web.config, that allow config to NOT inherit
in sub applications, it crashes web.config.
When web.config looks like this:
{{{
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<location path="." inheritInChildApplications="false">
<system.webServer>
<rewrite>
<rules>
}}}
...
wordpress thinks that the "system.webserver" is not present, so it append
it at the end of the web.config. And, we get a "500 error" because that
new edited web.config is invalid.
We fixed it temporary by disabling "write" access to web.config for our
app pool, but you should fix it, and correctly find the "rewrite rule"
even if it's under the <location> xml path.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/54161>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list