织梦首页index.html如何去掉

   2025-07-31 admin00120

织梦首页index.html如何去掉?

很多朋友在使用织梦建站或者仿站时都会发现,在访问首页时后面都会添加上index.html

现在我就把这解决办法分享出来,大家可以试一试,看有没有用

推荐学习:织梦cms

在www/跟目录下有个自带的index.php文件

立即学习“前端免费学习笔记(深入)”;

原代码

代码如下:

//自动生成HTML版if(isset($_GET['upcache'])){require_once(dirname(__FILE__)."/include/common.inc.php");require_onceDEDEINC."/arc.partview.class.php";$GLOBALS['_arclistEnv']='index';$row=$dsql->GetOne("Select*From`dede_homepageset`");$row['templet']=MfTemplet($row['templet']);$pv=newPartView();$pv->SetTemplet($cfg_basedir.$cfg_templets_dir."/".$row['templet']);$pv->SaveToHtml(dirname(__FILE__).'/index.html');include(dirname(__FILE__).'/index.html');exit();}else{header('HTTP/1.1301MovedPermanently');header('Location:index.html');}?>
 
举报收藏 0打赏 0评论 0
 
更多>同类资讯
推荐图文
推荐资讯
点击排行
网站首页  |  关于我们  |  联系方式  |  用户协议  |  隐私政策  |  版权声明  |  网站地图  |  RSS订阅  |  京ICP备2024057451号-2