织梦首页index.html如何去掉
织梦首页index.html如何去掉?
很多朋友在使用织梦建站或者仿站时都会发现,在访问首页时后面都会添加上index.html
现在我就把这解决办法分享出来,大家可以试一试,看有没有用
推荐学习:织梦cms
在www/ 跟目录下有个自带的index.php文件
原代码
代码如下://自动生成HTML版if(isset($_GET['upcache'])){require_once (dirname(__FILE__) . "/include/common.inc.php");require_once DEDEINC."/arc.partview.class.php";$GLOBALS['_arclistEnv'] = 'index';$row = $dsql->GetOne("Select * From `dede_homepageset`");$row['templet'] = MfTemplet($row['templet']);$pv = new PartView();$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.1 301 Moved Permanently');header('Location:index.html');}?>把上面的代码替换为
代码如下:require_once (dirname(__FILE__) . "/include/common.inc.php");require_once DEDEINC."/arc.partview.class.php";$GLOBALS['_arclistEnv'] = 'index';$row = $dsql->GetOne("Select * From `dede_homepageset`");$row['templet'] = MfTemplet($row['templet']);$pv = new PartView();$pv->SetTemplet($cfg_basedir . $cfg_templets_dir . "/" . $row['templet']);$pv->Display();?>然后就可以了。以上就是织梦首页index.html如何去掉的详细内容,更多请关注小潘博客其它相关文章!