【问题标题】:Giving index.html priority over index.php让 index.html 优先于 index.php
【发布时间】:2013-04-24 12:18:03
【问题描述】:

我有一个 wordpress 网站。现在索引页是index.php

问题是我不希望服务器使用 index.php 作为默认值,而是使用 index.html

index.html 只是一个临时页面(正在建设中),直到 wordpress 网站准备就绪。

目前域优先于 index.php - 我如何将其赋予 index.html?

注意:我确实没有在根目录中有 htaccess 文件.... 我相信您在其中指定了它?

【问题讨论】:

    标签: wordpress indexing


    【解决方案1】:

    目前这取决于您的服务器配置,某些 .htaccess 文件您可能也无权访问。您可以在自己的 htaccess 中定义/否决它,例如:

    DirectoryIndex index.html index.php
    

    优先级取决于您在该行中设置文件名的顺序

    【讨论】:

      【解决方案2】:

      制作一个 .htaccess 文件,其中包含“DirectoryIndex index.html”(无 qoutes)。

      【讨论】:

        猜你喜欢
        • 2011-12-13
        • 1970-01-01
        • 2013-11-03
        • 2020-08-02
        • 2012-06-29
        • 2022-11-02
        • 2013-04-18
        • 2011-06-22
        相关资源
        最近更新 更多