帝国CMS SQL修改新闻文章发布路径 含首页列表页路径

文章类型:常见问题    发表2020-05-27   文章编辑:怒熊网络 · 一站式互联网+技术服务商!   阅读:524

帝国CMS 自定义修改新闻文章发布路径 含首页列表页路径方式
问题描述:假如我们在使用帝国CMS的时候,原来发部的文章路径类似这样,www.nuxiong.com/news/2020-02-02/2012.html,或者是这样,www.nuxiong.com/news/2020/index.html,我们需要修改为适合百度SEO搜索引擎友好的地址:www.nuxiong.com/news/2012.html
帝国cms修改文章地址路径
解决方法:
依次执行下面四条sql语句:
 update phome_ecms_news set filename=CONCAT(id) where id>0;
 update phome_ecms_news set newspath=”;
 update phome_ecms_article set filename=CONCAT(id) where id>0;
 update phome_ecms_article set newspath=”;
说明:以上执行的有两张数据表,phpome_ecms_news和phpome_ecms_article,修改了两张表字段,filename和newspath。
以上执行完毕后,切记执行网站后台,系统-数据更新-更新信息页地址,然后再去数据更新的地方按照常规更新首页,信息页等地方...

至此就解决了把类似2020-02-02/2012.html地址及/2020/index.html地址改成了2020.html地址

那假如我们要改回来,需要把2020.html地址改为2020/index.hmtl呢?
依次执行下面的
 update phome_ecms_news set filename=CONCAT(id,’/index’) where id>0;
 update phome_ecms_news set newspath=”;
 update phome_ecms_article set filename=CONCAT(id,’/index’) where id>0;
 update phome_ecms_article set newspath=”;