# iis7_supports_permalinks()

URL: https://chugunov.pro/api-wordpress/functions/iis7_supports_permalinks/
Проверено на WordPress 6.9, обновлено 06.08.2026.
Источник: независимый русскоязычный справочник chugunov.pro. Не является официальной документацией WordPress.

Тип: функция.
Появился в версии: 2.8.0.

## Сигнатура

```php
iis7_supports_permalinks(): bool
```

## Описание

Проверяет, поддерживает ли IIS 7+ человекопонятные постоянные ссылки.

## Возвращаемое значение

`bool`

## Исходный код

Файл: `wp-includes/functions.php:6240`

```php
function iis7_supports_permalinks() {
	global $is_iis7;

	$supports_permalinks = false;
	if ( $is_iis7 ) {
		/* First we check if the DOMDocument class exists. If it does not exist, then we cannot
		 * easily update the xml configuration file, hence we just bail out and tell user that
		 * pretty permalinks cannot be used.
		 *
		 * Next we check if the URL Rewrite Module 1.1 is loaded and enabled for the website. When
		 * URL Rewrite 1.1 is loaded it always sets a server variable called 'IIS_UrlRewriteModule'.
		 * Lastly we make sure that PHP is running via FastCGI. This is important because if it runs
		 * via ISAPI then pretty permalinks will not work.
		 */
		$supports_permalinks = class_exists( 'DOMDocument', false ) && isset( $_SERVER['IIS_UrlRewriteModule'] ) && ( 'cgi-fcgi' === PHP_SAPI );
	}

	/**
	 * Filters whether IIS 7+ supports pretty permalinks.
	 *
	 * @since 2.8.0
	 *
	 * @param bool $supports_permalinks Whether IIS7 supports permalinks. Default false.
	 */
	return apply_filters( 'iis7_supports_permalinks', $supports_permalinks );
}
```

## История изменений

- 2.8.0 — Introduced.

## Связанные

Использует: [`apply_filters`](https://chugunov.pro/api-wordpress/functions/apply_filters/).
Используется в: [`network_step2`](https://chugunov.pro/api-wordpress/functions/network_step2/), [`iis7_save_url_rewrite_rules`](https://chugunov.pro/api-wordpress/functions/iis7_save_url_rewrite_rules/), [`got_url_rewrite`](https://chugunov.pro/api-wordpress/functions/got_url_rewrite/), [`redirect_canonical`](https://chugunov.pro/api-wordpress/functions/redirect_canonical/).

Оригинал в официальной документации: https://developer.wordpress.org/reference/functions/iis7_supports_permalinks/
