zoukankan      html  css  js  c++  java
  • dedecms中去除首页index.html的方法

    本文介绍了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 `#@__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,大家参考用之。
  • 相关阅读:
    【概念】构造函数和析构函数
    【概念】使用Fixed创建固定大小的缓冲区
    Sqoop
    Flume组件
    Hive节点及原理
    Yarn
    Hive数据倾斜
    单例
    工厂设计模式
    JVM对象创建
  • 原文地址:https://www.cnblogs.com/tanlingdangan/p/3800702.html
Copyright © 2011-2022 走看看