默认的dedecms首页生成静态后,打开我们所用dedecms搭建的网站会在域名后面加上index.html路径,一来看的不是太美观,而来传言对sem有所影响。
那就得想办法去掉,最简单的方法就是把dedecms根目录下的index.php内中的代码全部替换成如下:
<?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_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没有了。