织梦DedeCMS如何去掉首页域名后面的index.html
I..如果首页不
更多精彩就在: 51免费论文网|www.jxszl.com
需要生成HTML的,登录FTP打开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();
/*
//自动生成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]);
echo$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/I..I.III0I.MovedPermanently);
header(Location:index.html);
}
*/
?>
全部替换为以下代码:
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();
?>
II.第II种方法:
很多用户希望顶部导航连接便于SEO,需要去除超链接中的index.html",我们可以在这里对标签进行I.个修改:
{dede:channeltype=top}
III.第III种方法:
直接首页生成静态后把index.php修改为index.php_或者index-.php等等随你的便.只要不是index.php就OK了.怎么样?解决了织梦DedeCMS如何去掉首页域名后面的index.html的问题了吧.
但是这几种确不是最根本最简单的解决办法`请大家不要被他们所误导,现在我就给大家介绍个最基本最简单的办法```(也是朋友告诉我的)
大家只需要在空间管理里修改默认首页为index.html(用服务器的朋友在服务器里上移到第I.位就OK..)并且放在第I.位就OK了`问题就这么简单.以后大家碰上问题不要盲目的使用别人的办法`有关自己去钻研多学多问`别乱改动哟````
原文链接:http://www.jxszl.com/biancheng/dedecms/75260.html
热门阅读