WordPress at Your Fingertips
function is not described

got_url_rewrite() WP 3.7.0

Returns whether the server supports URL rewriting.

Detects Apache's mod_rewrite, IIS 7.0+ permalink support, and nginx.

Hooks from the function

Return

true|false. Whether the server supports URL rewriting.

Usage

got_url_rewrite();

Notes

  • Global. true|false. $is_nginx

Changelog

Since 3.7.0 Introduced.

Code of got_url_rewrite() WP 5.8.2

function got_url_rewrite() {
	$got_url_rewrite = ( got_mod_rewrite() || $GLOBALS['is_nginx'] || iis7_supports_permalinks() );

	/**
	 * Filters whether URL rewriting is available.
	 *
	 * @since 3.7.0
	 *
	 * @param bool $got_url_rewrite Whether URL rewriting is available.
	 */
	return apply_filters( 'got_url_rewrite', $got_url_rewrite );
}