dede去掉html的方法:1、直接删除CMS根目下的index.php文件;2、在根目录的.htaccess里加入代码“DirectoryIndexindex.htmlindex.phpindex.htm”;3、在主机里面设置默认首页顺序;4、替换index.php的内容生成动态即可。
本文操作环境:Windows7系统、DedeCMS5.6版,DELLG3电脑
dede怎么去掉html?
dedecms默认是通过后台生成index.html,去掉的方法有4种
1.直接删除CMS根目下的index.php文件[这个办法看似最简单,但是我自己试过后却不成功,而且删除后也没办法使用动态浏览了]
立即学习“前端免费学习笔记(深入)”;
2.使用.htaccess文件,目前使用的是这个办法,试验成功。
方法如下:在根目录的.htaccess里加入以下代码:DirectoryIndexindex.htmlindex.phpindex.htm「建议」
3.在主机里面设置默认首页顺序:把index.html提到最前面。根据不同主机有不同配置方法。
4.按官方给的更新说明替换index.php的内容生成动态,如果首页不需要生成HTML的,把index.php换成下面代码
if(!file_exists(dirname(__FILE__).'/data/common.inc.php')){header('Location:install/index.php');exit();}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->Display();?>if(!file_exists(dirname(__FILE__).'/data/common.inc.php')){header('Location:install/index.php');exit();}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->Display();?>