Make WordPress Core


Ignore:
Timestamp:
02/13/2024 10:06:22 AM (16 months ago)
Author:
swissspidy
Message:

Permalinks: Detect Caddy web server support.

Support pretty permalinks when Caddy server is detected.

Props swissspidy, mukesh27, sadpencil, cfinnberg, viliamkopecky.
Fixes #41877.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/vars.php

    r56638 r57612  
    1818global $pagenow,
    1919    $is_lynx, $is_gecko, $is_winIE, $is_macIE, $is_opera, $is_NS4, $is_safari, $is_chrome, $is_iphone, $is_IE, $is_edge,
    20     $is_apache, $is_IIS, $is_iis7, $is_nginx;
     20    $is_apache, $is_IIS, $is_iis7, $is_nginx, $is_caddy;
    2121
    2222// On which page are we?
     
    128128
    129129/**
     130 * Whether the server software is Caddy or something else
     131 *
     132 * @global bool $is_caddy
     133 */
     134$is_caddy = ( str_contains( $_SERVER['SERVER_SOFTWARE'], 'Caddy' ) );
     135
     136/**
    130137 * Whether the server software is IIS or something else
    131138 *
Note: See TracChangeset for help on using the changeset viewer.