Add nginx detection to the Permalink Settings screen.

Introduces got_url_rewrite() and a corresponding filter, which should now be used in lieu of the got_rewrite filter in got_mod_rewrite().

This does not write or even suggest nginx configuration; rather, it prevents nginx from being considered as either Apache or as an unrecognized server.

props johnbillion.
fixes #25098.

Built from https://develop.svn.wordpress.org/trunk@25456


git-svn-id: http://core.svn.wordpress.org/trunk@25377 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Andrew Nacin
2013-09-16 20:07:09 +00:00
parent 1de240d5a2
commit d3b89d43fc
3 changed files with 50 additions and 7 deletions

View File

@@ -86,6 +86,12 @@ $is_IE = ( $is_macIE || $is_winIE );
*/
$is_apache = (strpos($_SERVER['SERVER_SOFTWARE'], 'Apache') !== false || strpos($_SERVER['SERVER_SOFTWARE'], 'LiteSpeed') !== false);
/**
* Whether the server software is Nginx or something else
* @global bool $is_nginx
*/
$is_nginx = (strpos($_SERVER['SERVER_SOFTWARE'], 'nginx') !== false);
/**
* Whether the server software is IIS or something else
* @global bool $is_IIS