在函数function GetFileUrl中,修改第73行:
if($moresite==1) { $articleUrl = preg_replace("/^".$sitepath.'/', '', $articleUrl); }
在路径正则表达式把斜杠/换成分号',修改后如下:
if($moresite==1) { $articleUrl = preg_replace("'^".$sitepath."'",'',$articleUrl); }
同理修改第260行左右的代码:
if($GLOBALS['cfg_multi_site']=='Y') { if($siteurl=='') { $siteurl = $GLOBALS['cfg_basehost']; } if($moresite==1 ) { $reurl = preg_replace("/^".$sitepath."/", '', $reurl);
将以上最后一句代码修改为:
$reurl = preg_replace("'^".$sitepath."'",'', $reurl);
这样修改后,就可以生成正确的二级域名文件路径了。
标签:织梦DedeCMS
相关阅读 >>
dedecms自定义模型提示:call to a member function getinnertext()的解决方法
dedecms后台编辑文章时archives_do.php显示空白解决办法
dedecms织梦模板描述description长度限制修改方法
更多相关阅读请进入《织梦DedeCMS》频道 >>