我的 .htaccess 不工作,即使我为 DirectoryIndex 设置了正确的路径

问题描述 投票:0回答:0

嗨,我在 ubuntu 服务器上托管了一个 PHP 网站。 -PHP 版本 7.4,ubuntu 20 所以现在我的根目录是

html
并且我尝试将 .htaccess 放入
html
但它仍然显示
Index Page
每当我访问我的域

我的.htaccess

DirectoryIndex public/layouts/login.php

我的目录是这样的: Directory

When i go to my domain

第一个目录好像是"html", 在“html”目录中,还有另一个名为“public”的目录。 在“public”目录中,有两个名为“include”和“layouts”的子目录。 “layouts”目录包含一个名为“login.php”的文件。

我想在用户进入我的服务器时将 login.php 作为默认页面。我该怎么做?

php .htaccess ubuntu hosting
© www.soinside.com 2019 - 2024. All rights reserved.