[织梦教程] dedecms织梦首页去除index.html的方法

[复制链接]
查看1883 | 回复12 | 2019-5-26 19:07:19 | 显示全部楼层 |阅读模式

本文介绍了dedecms中去除首页index.html的方法,有需要的朋友参考下。

dedecms织梦cms建站程序输入地址后,而打开的实际地址后面有个index.html。
 
这里分享下两种解决方法:
 
1、把网站默认首页index.html放到index.php前面,即配置好默认首页即可解决。
 
2、把dedecms的index.php更改为
 
代码示例:
<?php
//自动生成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->savetohtml(dirname(__file__).'/index.html');
 include(dirname(__file__).'/index.html');
 exit();
?>
 
就是把那段301定向代码删除:
 
 
header(‘http/1.1 301 moved permanently’);
header(‘location:index.html’);
以上二种方法,均可实现dedecms首页地址不带index.html,大家参考用之。
 
织梦教程网络上有很多,但没有一个像自由织梦(www.freedede.cn)这样教程比较齐全的,现在好了,学习开发使用织梦dedecms系 统不用东奔西跑了,直接来自由织梦就好了,提供织梦cms详细的使用教程和织梦建站教程,包括dedecsm的安装、模板开发教程、安 全配置等,DedeCMS从入门到精通建站就是如此轻松。
回复

使用道具 举报

清荼蘼荼iq | 2020-10-25 00:35:36 | 显示全部楼层
悟空源码太厉害,资源真多!
回复

使用道具 举报

群主713 | 2021-1-7 12:29:37 | 显示全部楼层
这个下载站资源真齐全
回复

使用道具 举报

成哥337 | 2021-2-2 00:36:00 | 显示全部楼层
感谢悟空源码分享精品资源!
回复

使用道具 举报

便宜老鼠药沼 | 2021-8-31 04:10:04 | 显示全部楼层
站长真良心,这么大的资源站都是免费下载
回复

使用道具 举报

胖胖龙龙灯 | 2021-11-8 07:53:18 | 显示全部楼层
这个下载站资源真齐全
回复

使用道具 举报

绣绣仙女酌 | 2022-6-2 13:59:05 | 显示全部楼层
6666悟空源码资源多!
回复

使用道具 举报

孙悟空748 | 2022-6-3 08:21:36 | 显示全部楼层
悟空源码资源不错。粉了
回复

使用道具 举报

去火星三小时自 | 2022-8-31 07:34:57 | 显示全部楼层
找了好多地方,终于找到了
回复

使用道具 举报

123457191 | 2023-6-5 06:07:31 | 显示全部楼层
5kym.cn这个站资源太全了
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则