Permalinks: Detect Caddy web server support.
Support pretty permalinks when Caddy server is detected. Props swissspidy, mukesh27, sadpencil, cfinnberg, viliamkopecky. Fixes #41877. Built from https://develop.svn.wordpress.org/trunk@57612 git-svn-id: http://core.svn.wordpress.org/trunk@57113 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -154,7 +154,7 @@ if ( $iis7_permalinks ) {
|
||||
} else {
|
||||
$writable = false;
|
||||
}
|
||||
} elseif ( $is_nginx ) {
|
||||
} elseif ( $is_nginx || $is_caddy ) {
|
||||
$writable = false;
|
||||
} else {
|
||||
if ( ( ! file_exists( $home_path . '.htaccess' )
|
||||
@@ -190,7 +190,7 @@ if ( $structure_updated ) {
|
||||
'<code>web.config</code>'
|
||||
);
|
||||
}
|
||||
} elseif ( ! $is_nginx && $htaccess_update_required && ! $writable ) {
|
||||
} elseif ( ! $is_nginx && ! $is_caddy && $htaccess_update_required && ! $writable ) {
|
||||
$message = sprintf(
|
||||
/* translators: %s: .htaccess */
|
||||
__( 'You should update your %s file now.' ),
|
||||
|
||||
Reference in New Issue
Block a user