WordPress.org

Make WordPress Core

Changeset 14312


Ignore:
Timestamp:
04/29/2010 09:41:20 PM (8 years ago)
Author:
westi
Message:

Fix support for rewrites on IIS7. Fixes #12973 props Frumph and ruslany.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/misc.php

    r13806 r14312  
    489489        return false;
    490490    $xpath = new DOMXPath($doc);
    491     $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[@name=\'wordpress\']');
     491    $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
    492492    if ( $rules->length == 0 )
    493493        return false;
     
    518518        return false;
    519519    $xpath = new DOMXPath($doc);
    520     $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[@name=\'wordpress\']');
     520    $rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
    521521    if ( $rules->length > 0 ) {
    522522        $child = $rules->item(0);
     
    558558
    559559    // First check if the rule already exists as in that case there is no need to re-add it
    560     $wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[@name=\'wordpress\']');
     560    $wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')]');
    561561    if ( $wordpress_rules->length > 0 )
    562562        return true;
Note: See TracChangeset for help on using the changeset viewer.