设置网站默认文档index.html 在 index.php 前面后

dongpangzi 2018-12-13 507

设置网站默认文档index.html 在 index.php 前面后,当输入目录,无index.html时,并不自动以index.php 作为访问文档

最新回复 (3)
  • 虚竹 2018-12-13
    引用 2
    大部分程序都是优先 index.html 然后 index.php,如果 index.html 不存在,就是访问 index.php。
    你这种非常见的需求,面板上是不提供的。
    可能需要通过rewrite规则来实现(我也没试过)。
  • dongpangzi 2018-12-14
    引用 3
    老板这个不是非常见要求啊,首页html,后台是php,但设置index.html为默认文档第一位后,访问后台目录,index.php 就不会自动访问了,说明排序并不能自动识别顺序第二位
  • 虚竹 2018-12-14
    引用 4
    默认文档顺序为:
    index.html
    index.php

    如果存在index.html则访问index.html,如果不存在则访问index.php。
    如果index.html不存在而不会自动访问index.php,有可能是你做了rewrite规则影响了。
返回
发新帖