Skip to content

Commit 9a589db

Browse files
authored
Merge pull request #458 from mrrobot47/fix/redirect-non-ssl
feat(site): update add_site_redirects to handle redirect for non-ssl
2 parents ec1f7b2 + 4f70d31 commit 9a589db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/helper/site-utils.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ function add_site_redirects( string $site_url, bool $ssl, bool $inherit ) {
278278
$crt_file = $certs_dir . $cert_site_name . '.crt';
279279
$key_file = $certs_dir . $cert_site_name . '.key';
280280

281-
if ( file_exists( $crt_file ) && file_exists( $key_file ) ) {
281+
if ( ( $ssl && file_exists( $crt_file ) && file_exists( $key_file ) ) || ! $ssl ) {
282282
if ( $has_www ) {
283283
$server_name = ltrim( $site_url, '.www' );
284284
} else {

0 commit comments

Comments
 (0)