让开发人员为wordpress构建了一个主题。该网站 beonpointe.com - 试图让它上线,网址只是重定向到/index1.html - 主机没有域转发,HTACCESS 中也没有任何域转发。
我在主题的功能中找到了一个片段.php,但取消注释以查看它是否有效,但仍然不起作用。请问有人可以帮忙吗?!
代码片段是:
<?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');
?>
将不胜感激。我提前谢谢你。
<?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');
?>
更多信息 ro 重定向
将以下内容添加到 wp-config.php:
$_SERVER['HTTPS'] = 'on';