562
562
$xpath = new DOMXPath($doc);
564
564
// First check if the rule already exists as in that case there is no need to re-add it
565
$wordpress_rules = $xpath->query('/configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'wordpress\')] | /configuration/system.webServer/rewrite/rules/rule[starts-with(@name,\'WordPress\')]');
566
566
if ( $wordpress_rules->length > 0 )