Opened 16 years ago
Closed 16 years ago
#12973 closed defect (bug) (fixed)
Multisite and IIS7 - permalinks change, the web.config problem
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Milestone: | 3.0 | Priority: | high |
| Severity: | blocker | Version: | 3.0 |
| Component: | Rewrite Rules | Keywords: | has-patch |
| Focuses: | Cc: |
Description
When adjusting the settings->permalinks with IIS7/server 2008 what is happening is the wp code is 'adding' to the web.config's current rules and not deleting the old. So the duplicate rule key error is coming up.
Attachments (3)
Change History (15)
#1
@
16 years ago
- Component changed from General to Rewrite Rules
- Milestone changed from Unassigned to 3.0
- Owner set to ryan
- Priority changed from normal to high
Also #12979
#4
@
16 years ago
there is add on problem to this
the .htaccess allows extra rules to be add (generated) to IIS code is a just a dump of a stactic text block
So plugins like supper cache can't add the rules it needs to work
It would good if we fixed this if not for 3.0 but in the next version
Paul
#5
@
16 years ago
This is a blocker for me, because it crashs after changing the permalink structure so then editing the web.config to fix it manually - it never gets to the point of actually changing the permalink structure in the database.
#6
follow-up:
↓ 8
@
16 years ago
The patch for this bug http://trac.mu.wordpress.org/ticket/991 used to take care of this problem. It was checked in to WPMU last year. But it looks like the latest version of WPMU reverted back to the old code and because of that this problem happens. The line in question is in /wp-admin/include/misc.php
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[@name=\'wordpress\']');
It should be $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
#8
in reply to:
↑ 6
@
16 years ago
Replying to ruslany:
The patch for this bug http://trac.mu.wordpress.org/ticket/991 used to take care of this problem. It was checked in to WPMU last year. But it looks like the latest version of WPMU reverted back to the old code and because of that this problem happens. The line in question is in /wp-admin/include/misc.php
$rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[@name=\'wordpress\']');
It should be $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
This does not fix the issue. It appears that it's not checking if the rules pre-exist.
If I delete the web.config before hitting the permalinks -save it saves again.
Unfortunately I need it to check if the rules pre-exist since i have some custom rules.
#9
@
16 years ago
Sorry my bad, if I delete the web.config completely it does the same thing with a freshly made web.config from the system.
Like the rules are trying to be added twice someplace, going to try to trace it.
Good web.config