A WordPress-centric search engine for devs and theme authors



got_url_rewrite ›

Since3.7.0
Deprecatedn/a
got_url_rewrite ( No parameters )
Returns:
  • (bool) Whether the server supports URL rewriting.
Defined at:
Codex:

Returns whether the server supports URL rewriting.

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



Source

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 );
}