WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#10386 closed enhancement (fixed)

The rewrite rules generated for IIS URL Rewrite Module causes user confusion

Reported by: ruslany Owned by: westi
Milestone: 2.9 Priority: high
Severity: normal Version: 2.8.1
Component: Rewrite Rules Keywords: has-patch
Focuses: Cc:
PR Number:

Description

This is related to #8974. If the IIS web.config file does not exist, the rewrite rules XML that is given at the "Permalinks Settings" page contains only the rewrite rule, but not all the parent XML configuration tags required by IIS. Very often users just take this XML and paste it into an empty web.config file and this causes the IIS configuration runtime error (HTTP 500 returned).

The logic should be to check if the web.config file does not exist and if the root directory is not writable then provide the complete web.config file content, which users can just copy and paste into the empty web.config file. See attached screenshot for how it is supposed to look like.

Attachments (3)

CreateWebConfig.png (149.0 KB) - added by ruslany 10 years ago.
If the web.config file does not exist then the instructions and the XML given to the users should be different.
10386.patch (4.6 KB) - added by ruslany 10 years ago.
Patch with proposed fix.
10386-whale.patch (5.9 KB) - added by peaceablewhale 10 years ago.

Download all attachments as: .zip

Change History (11)

@ruslany
10 years ago

If the web.config file does not exist then the instructions and the XML given to the users should be different.

@ruslany
10 years ago

Patch with proposed fix.

#1 @peaceablewhale
10 years ago

I have uploaded a patch that improves the formatting of the web.config file generated by WordPress and fixes an encoding conflict by forcing the generated file to be UTF-8.

#2 @peaceablewhale
10 years ago

  • Component changed from General to Administration

The patch has to be updated when #10384 is fixed.

#3 @ruslany
10 years ago

Verified the new patch (10386-whale.patch). Works well. Thanks for fixing up the formatting and encoding issue.

#4 @ryan
10 years ago

  • Component changed from Administration to Rewrite Rules

#5 @westi
10 years ago

  • Keywords needs-testing added
  • Priority changed from normal to high

Could someone check the patch still applies and works as expected please so we can get this into 2.9

#6 @ruslany
10 years ago

  • Keywords needs-testing removed

I have just tried the patch with the latest version (WordPress 2.9-beta-1) and it applied and worked as expected.

#7 @peaceablewhale
10 years ago

Verified working too

#8 @ryan
10 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [12264]) Improve IIS rewrite support. Props ruslany, peaceablewhale. fixes #10386

Note: See TracTickets for help on using tickets.