• 织梦如何去掉首页的后缀


    首先找到网站根目录下面的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();


    //自动生成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']);
    echo $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');
    }

    ?>

     

    全部替换为:

     

     

    <?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();
    ?>

    ************************************************** *********************** ***************** 每个文章内容都是测试有效的
  • 相关阅读:
    grpc(五)
    go的代码库
    grpc(四)
    grpc(三)
    grpc(二)
    grpc(一)
    java的泛型
    如何学习编程语言
    老男孩K8S集群部署(二)
    VMware虚拟机状态正常,但SecureCRT连接时显示超时的解决方法
  • 原文地址:https://www.cnblogs.com/beijinglaolei/p/9836363.html
Copyright © 2020-2023  润新知