Make WordPress Core

Opened 8 years ago

Last modified 5 years ago

#40719 new defect (bug)

iis7_add_rewrite_rule and iis7_delete_rewrite_rule create malformed web.config

Reported by: jaendres's profile jaendres Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.7.4
Component: Rewrite Rules Keywords:
Focuses: administration Cc:

Description

Running wordpress in azure on version 4.7.4 and i have a custom web config utilizing the location directive. The methods iis7_add_rewrite_rule and iis7_delete_rewrite_rule do not take into account when these directives exist and create a new system.webserver line in the web.config at the bottom causing the server to 500 error. This seems to happen even when simply deleting a post using the admin console, wp is thinking the web.config is wrong and trying to add lines. As an immediate work around i have disabled these methods, is there a configuration that will allow me to stop wordpress from ever doing this? I dont have the ability to change the web.config permissions because its a PAAS implementation. Example config:

<configuration>

<location path="wp-admin">

<system.webServer>

<security>

<ipSecurity allowUnlisted="false">

<add ipAddress="x.x.x.x" allowed="true" />

</ipSecurity>

</security>

</system.webServer>

</location>
<location>

<system.webServer>

<security>

<requestFiltering removeServerHeader="true" />

</security>

</system.webServer>

</location>

</configuration>

This is only a partial sample of the file.

Change History (1)

#1 @valentinbora
5 years ago

  • Component changed from Administration to Rewrite Rules

Hi @jaendres, welcome to Trac. Thank you for posting this ticket and sorry for the long delay on our side.

Since this issue pertains to Rewrite Rules, I'll go ahead and re-route it to the appropriate component so it can be reviewed.

Note: See TracTickets for help on using tickets.