一位网友给ytkah反映说phpcms站点域名配置https无法提交,在后台修改站点域名为https提交后提示“站点域名格式应该为http://www.phpcms.cn/,请以‘/’结束”,这个要如何修改呢?通过关键词定位我们找到文件的修改路径/phpcms/modules/admin/site.php,第一步:大概89行找到

if (!empty($domain) && !preg_match('/http:\/\/(.+)\/$/i', $domain)) {
showmessage(L('site_domain').L('site_domain_ex2'));
}

  将它改成

if (!empty($domain) && !preg_match('/https:\/\/(.+)\/$/i', $domain)) {
showmessage(L('site_domain').L('site_domain_ex2'));
}

  第二步:再找到255行左右

if (!empty($domain) && !preg_match('/http:\/\/(.+)\/$/i', $domain)) {
showmessage(L('site_domain').L('site_domain_ex2'));
}

  改成

if (!empty($domain) && !preg_match('/https:\/\/(.+)\/$/i', $domain)) {
showmessage(L('site_domain').L('site_domain_ex2'));
}

  保存上传,重新更改网站域名加https就不会弹出错误提示了。

phpcms站点域名配置https无法提交如何处理的更多相关文章

  1. [转帖]在 k8s 中自动为域名配置 https

    在 k8s 中自动为域名配置 https https://juejin.im/post/5db8d94be51d4529f73e2833 随着 web 的发展,https 对于现代网站来说是必不可少的 ...

  2. 何给域名配置https证书

    原文链接:https://www.cnblogs.com/ymwang/p/6893105.html http和https的区别就是,后者在网络传输过程中会很安全,原因就是给http安装了SSL证书. ...

  3. 如何给域名配置https证书

    http和https的区别就是,后者在网络传输过程中会很安全,原因就是给http安装了SSL证书. SSL证书有免费的和收费的,收费的顾名思义就是保护的方面更多,更安全.收费的像单域名的一年有几百.几 ...

  4. 域名配置https

    阿里可以一年的免费申请https证书 (1)域名->管理->免费开启SSL证书 (2)申请完.等待审核后就可以下载证书压缩包,包括key和pem两个文件 (3)在服务器的nginx目录下创 ...

  5. 为阿里云域名配置免费SSL支持https加密访问简单教程

    阿里云之前有免费ssl入口申请,现在已经关闭了.那么现在怎么为自己的域名配置https呢? 首先打开阿里云域名控制台,如以下界面.(这里暂且用我的这个域名讲解吧)  如上图点击ssl证书,点击单域名免 ...

  6. Apache的域名配置

    配置独立域名有什么好处呢?我们在本地做程序开发,要同时用很多开源程序.CMS.框架,或者自己写的管理系统,那么给他们每一个都配置一个独立的域名,在测试的时候只要在浏览器输入设置好的域名就可以了,非常方 ...

  7. Centos7配置https,及多个https配置

    Centos7.2配置https,及多个https配置 1.单个https配置 检查相关依赖,如果没有就yum安装 yum install mod_ssl openssl rpm -qa| grep ...

  8. nginx强制使用https访问(多站点多域名配置)

    很多配置过https模板的人都知道,配置https 时 ,站在用户的角度http 和https 的区别根本不清楚.有时候敲 http 时会出现 404 错误,而实际上我们是https. 有朋友找我配置 ...

  9. linux配置https站点

    配置https站点呢,那就需要https证书,证书从何而来,花钱买?no,no,no,阿里有免费的,只是比较难发现,下面就图文解说一下怎么买免费的阿里https证书 首先阿里云,登录,购买链接———— ...

随机推荐

  1. [LeetCode] 104. Maximum Depth of Binary Tree 二叉树的最大深度

    Given a binary tree, find its maximum depth. The maximum depth is the number of nodes along the long ...

  2. [LeetCode] 34. Find First and Last Position of Element in Sorted Array 在有序数组中查找元素的第一个和最后一个位置

    Given an array of integers nums sorted in ascending order, find the starting and ending position of ...

  3. 做作业时看到的 Demo

    public class HelloWorld { public static void main(String[] args) { outer: for(int i = 0;i < 3; i+ ...

  4. WPF DataGrid 鼠标对表格双击导致客户端崩溃

    该问题是由于在创建DataGrid时没有设置为只读属性 解决:             <DataGrid Name="switchInfoList" MouseLeftBu ...

  5. qt no doubments matching "ui..h" could be found

    问题情境描述: 自己单独添加的UI文件,然后添加一个类来使用这个UI文件,第一次输入UI Form名称时是大写,被添加到工程里面就是大写, 大写的情况下,添加action转到槽就会提示这个错误. 修改 ...

  6. C#自定义特性的使用

    特性类的使用过程: 第一步:定义一个特性类,定义一些成员来包含验证时需要的数据:第二步:创建特性类实例:创建一个特性类的实例,里面包含着验证某一个属性或者字段需要的数据.将该实例关联到某个属性上面.第 ...

  7. guava(二) Equivalence & Supplier

    一.Equivalence 一种判定两个实例是否相等的策略 全路径: com.google.common.base 声明: @GwtCompatible public abstract class E ...

  8. 第24课 std::thread线程类及传参问题

    一. std::thread类 (一)thread类摘要及分析 class thread { // class for observing and managing threads public: c ...

  9. 五年微软DevOps MVP (也称TFS MVP)

    笔者有幸第五次被微软授予MVP称号,高兴之余,在这里简单的介绍一下MVP的基本情况: 谁是 MVP? Microsoft 最有价值专家 (MVP) 是热情地与社区分享知识的技术专家.他们总是处于&qu ...

  10. 关于wepy小程序图片显示问题

    如果图片资源在本地,用background-image 是无法找到本地资源的,只能通过image标签用src进行引入: 图片资源在服务器上,用背景图片和image进行引入,在安卓真机上测试是没有问题的 ...