织梦怎么让首页不显示index.html,怎样设置织梦DedeCMS跳转网址不显示中转页

怎样设置织梦DedeCMS跳转网址不显示中转页。

当文档设置为跳转并添加跳转网址后如何不经过中转页而直接显示arcurl底层模板中!

打开include/channelunit.func.php文件,找到下代码:

if($rank!=0 || $ismake==-1 || $typeid==0 || $money>0)

{

//动态文章

if($cfg_rewrite == 'Y')

{

return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';

}

else

{

return $GLOBALS['cfg_phpurl']."/view.php?aid=$aid";

}

}

修改为:

if($rank!=0 || $ismake==-1 || $typeid==0 || $money>0)

{

$flag = $dsql->GetOne("select * from dede_archives where id = $aid;");

$flag = $flag['flag'];

if(preg_match("/j/",$flag)){

$addontable = $dsql->GetOne("select art.id,cht.addtable from dede_arctype art left join dede_channeltype cht on art.channeltype = cht.id where art.id = $typeid");

$addtable = $addontable['addtable'];

$GoUrl = $dsql->GetOne("select redirecturl from $addtable where aid = $aid");

$redirecturl = $GoUrl['redirecturl'];

if($redirecturl != ''){

return $redirecturl;

}

else{

//动态文章

if($cfg_rewrite == 'Y'){

return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';

}

else{

return $GLOBALS['cfg_phpurl']."/view.php?aid=$aid";

}

}

}

//动态文章

if($cfg_rewrite == 'Y')

{

return $GLOBALS["cfg_plus_dir"]."/view-".$aid.'-1.html';

}

else

{

return $GLOBALS['cfg_phpurl']."/view.php?aid=$aid";

}

}

保存即可,看看效果图片:

daf91e0d2585dbbc8c23fd99cc8ff1e6.png

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值