如何将DEDE织梦网站首页的index.html去掉

 时间:2024-10-28 06:40:35

1、把网站默认首页index.html放到index.php前面,这样它自动读到index.html就不会跳转了

2、按官方给的更新说明 钣伊帝藻替换index.php的内容 生成动态,如果首页不需要生成HTML的, 把index.php换成下面代码原代洁船诼抨码<?phpif(!file_exists(dirname(__FILE__).'/data/common.inc.php')){ header('Location:install/index.php'); exit();}//自动生成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');}?>替换为<?phpif(!file_exists(dirname(__FILE__).'/data/common.inc.php')){ header('Location:install/index.php'); exit();}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();?>到FTP中下载index.php,用Dreamweaver打开,将上述代码进行替换即可。

如何将DEDE织梦网站首页的index.html去掉
如何将DEDE织梦网站首页的index.html去掉

3、使用.htaccess文件目前使用的是这个办法,试验成功。方法如下:  在根目录的.htaccess里加入以下代码:  DirectoryIndex index.html index.php index.htm就这么简单。 

4、在主机里面设置默认首页顺序:把index.html提到最前面。  因主机不同,设置方法也不同。就不具体细说了。 一般都不去这些的

  • 什么样的男人才算是男人?
  • 2012年四川峨眉山旅游攻略
  • 世界OL枪战过副以及pk攻略
  • 哈利波特围巾怎么摘掉
  • 度小满金融在哪?百度app怎么查看账户余额信息
  • 热门搜索
    法制与安全的手抄报 福娃过大年手抄报 法律伴我行手抄报 家规家训手抄报 神话故事手抄报图片 手抄报的边框 美德少年手抄报内容 普法手抄报图片 知法懂法守法手抄报 清明手抄报图片大全