dede开启网站绝对路径后软件下载地址出错

发布时间 2023-07-14 11:42:52作者: asqq8
今天教大家如何解决(织梦CMS启用绝对网址后,下载页面的软件下载地址出错)
织梦开启绝对路径后软件模型,下载地址填https://开头的,调用出来会显示  域名+https://网址,如下图网址

解决方法:
1、打开 /plus/download.php 找到 大概在 147行

if(!preg_match("#^http://|^thunder://|^ftp://|^flashget://#i", $link))


改成:

if(!preg_match("#^http://|^https://|^thunder://|^ftp://|^flashget://#i", $link))


继续找到,大概159行

#http


改成:

#(http|https)


2、打开 /include/taglib/channel/softlinks.lib.php 找到 大概在 87行

if(!preg_match("#^http://|^thunder://|^ftp://|^flashget://#i", $link))


改成

if(!preg_match("#^http://|^https://|^thunder://|^ftp://|^flashget://#i", $link))


继续找到,大概在 109行

#http


改成

#(http|https)


好了,大功告成,现在刷新下网站看看下载地址有没有改变。