我有网站http://mywebsite.com如果我点击这个 URL,它会将 index.php 和 index.html 作为默认页面。如何将 home.php 设为默认页面。 我试过这个但没有通过将以下代码放在 public_html 的 .htaccess 文件中来工作
DirectoryIndex home.php index.html index.php
最佳答案
您只需要在您的 DirectoryIndex
中添加 home.php
即可使其正常工作。请记住,这是在您的根项目的 .htaccess 文件中使用的:
DirectoryIndex home.php
关于php - 如何制作默认页面 home.php 而不是 index.html 和 index.php,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/15779198/