Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/actionscript-3/7.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
如何在Wordpress/Woocommerce中禁用自动https重定向?_Wordpress_Wordpress Theming - Fatal编程技术网

如何在Wordpress/Woocommerce中禁用自动https重定向?

如何在Wordpress/Woocommerce中禁用自动https重定向?,wordpress,wordpress-theming,Wordpress,Wordpress Theming,我已经安装了wordpress+woocommerce网站。所有页面都使用https。我怎样才能避免呢?我只需要http 编辑: 在wp_选项表中,我将“home_url”和“base_url”都设置为以phpMyAdmin中的http开头。但它不起作用。为什么?要更改和重定向https页面,您需要使用以下内部函数。php function force_http () { if ( is_ssl() ) { wp_redirect('http://' . $_SERVER['HTT

我已经安装了wordpress+woocommerce网站。所有页面都使用https。我怎样才能避免呢?我只需要http

编辑:
在wp_选项表中,我将“home_url”和“base_url”都设置为以phpMyAdmin中的http开头。但它不起作用。为什么?

要更改和重定向https页面,您需要使用以下内部函数。php

function force_http () {

  if ( is_ssl() ) {
    wp_redirect('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 );
    exit();
  }
}
add_action ( 'template_redirect', 'force_http', 1 );

要更改和重定向https页面,您需要在functions.php中使用以下函数

function force_http () {

  if ( is_ssl() ) {
    wp_redirect('http://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'], 301 );
    exit();
  }
}
add_action ( 'template_redirect', 'force_http', 1 );

我不确定那是个好主意。如果你将要传递ppl的信用卡或任何个人信息,那么我怀疑你将无法使用http。这些数据将在paypal网站上传递。所以现在我必须禁用https。我怎么做呢?我不确定那是个好主意。如果你将要传递ppl的信用卡或任何个人信息,那么我怀疑你将无法使用http。这些数据将在paypal网站上传递。所以现在我必须禁用https。我怎么做?