We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 336c9be commit c5c23afCopy full SHA for c5c23af
force-https.php
@@ -26,7 +26,7 @@
26
27
// force https redirection for all non-https requests
28
add_action( 'init', function() {
29
- if ( ! is_ssl() && ! is_admin() && php_sapi_name() !== 'cli' ) {
+ if ( ! is_ssl() && ! is_admin() && PHP_SAPI !== 'cli' ) {
30
if ( ! headers_sent() ) {
31
$redirect_url = home_url( add_query_arg( null, null ) );
32
wp_safe_redirect( set_url_scheme( $redirect_url, 'https' ), 301 );
0 commit comments