帝国cms从https改回http传输协议
经营范围:电脑组装,电脑维修,智能家居设备,苹果电脑系统安装,苹果手机刷机,监控安装,媒体编辑,数据恢复,复印打印,网站制作等 |
帝国cms已经开通了https协议,但是由于要本地调试,或网站迁移,或是更换域名,老域名无法访问了,我们需要把https改回http协议才能操作
下面几个关键点更改即可达到目的。
1. 根目录下rewrite文件web.config或是.htaccess,删掉强制跳转https的代码,如下对应代码去找,删掉。
web.config
<rule name="HTTP to HTTPS redirect" stopProcessing="true"> <match url="(.*)" /> <conditions><add input="{HTTPS}" pattern="off" ignoreCase="true" /></conditions> <action type="Redirect" redirectType="Found" url="http://{HTTP_HOST}/{R:1}" /> </rule>
|
.htaccess
RewriteCond %{SERVER_PORT} !^ RewriteRule ^.*$ http://%{SERVER_NAME}%{REQUEST_URI} [L,R] |
或
RewriteCond %{HTTPS} off RewriteCond %{HTTP:X-Forwarded-Proto} =http RewriteRule (.*) http://%{HTTP_HOST}%{REQUEST_URI} [R=301,L] |
2. e/class/connet.php中如下代码最后一行改回return 'http://'.$domain;
//返回当前域名 function eReturnDomain(){ $domain=RepPostStr($_SERVER['HTTP_HOST'],1); if(empty($domain)) { return ''; } return 'http://'.$domain; } |
3. 数据库中phome_enewspublic的
newsurl 改回/
fileurl 改回/d/file/