Wordpress retransmission error

If a developer created a theme for wordpress. The site beonpointe.com - tried to make it live and the url just redirects to / index 1.html - there is no host domain forwarding and no domain forwarding in HTACCESS.

I found a snippet in the theme's functions.php, but uncommented it to see if it would work, and it still doesn't. Please, help?!

Snippet of code:

<?php 
define('TEMPLATE_DOMAIN', 'beonpointe'); 
define('BOP_IS_LIVE', 'true'); 

function only_admin_access(){ 
    if( BOP_IS_LIVE == 'true' ): 
        if( !is_user_logged_in() ): 
            wp_redirect( site_url('') ); 
        endif; 
    endif; 
}
add_action('wp_top_head', 'only_admin_access'); 
?>

      

It would be very grateful. I thank you in advance.

+3


source to share


2 answers


<?php 
define('TEMPLATE_DOMAIN', 'beonpointe'); 
define('BOP_IS_LIVE', 'true'); 

function only_admin_access(){ 
    if( BOP_IS_LIVE == 'true' ): 
        if( !is_user_logged_in() ): 
           wp_redirect( home_url() ); 
           exit;
        endif; 
    endif; 
}
add_action('wp_top_head', 'only_admin_access'); 
?>

      



Additional information ro redirect

0


source


Add the following to wp-config.php:



 $_SERVER['HTTPS'] = 'on';

      

0


source







All Articles