WordPress at a glance
function is not described

WP_Rewrite::iis7_url_rewrite_rules() public WP 2.8.0

Retrieves IIS7 URL Rewrite formatted rewrite rules to write to web.config file.

Does not actually write to the web.config file, but creates the rules for the process that will.

It's a method of the class: WP_Rewrite{}

Hooks from the method
Return

String. IIS7 URL rewrite rule sets.

Usage

$WP_Rewrite = new WP_Rewrite();
$WP_Rewrite->iis7_url_rewrite_rules( $add_parent_tags );
$add_parent_tags(true/false)
Whether to add parent tags to the rewrite rule sets.
Default: false

Changelog

Since 2.8.0 Introduced.

Code of WP_Rewrite::iis7_url_rewrite_rules() WP 5.5.1

<?php
public function iis7_url_rewrite_rules( $add_parent_tags = false ) {
	if ( ! $this->using_permalinks() ) {
		return '';
	}
	$rules = '';
	if ( $add_parent_tags ) {
		$rules .= '<configuration>
<system.webServer>
	<rewrite>
		<rules>';
	}

	$rules .= '
		<rule name="WordPress: ' . esc_attr( home_url() ) . '" patternSyntax="Wildcard">
			<match url="*" />
				<conditions>
					<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
					<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
				</conditions>
			<action type="Rewrite" url="index.php" />
		</rule>';

	if ( $add_parent_tags ) {
		$rules .= '
		</rules>
	</rewrite>
</system.webServer>
</configuration>';
	}

	/**
	 * Filters the list of rewrite rules formatted for output to a web.config.
	 *
	 * @since 2.8.0
	 *
	 * @param string $rules Rewrite rules formatted for IIS web.config.
	 */
	return apply_filters( 'iis7_url_rewrite_rules', $rules );
}