如何使默认页面home.php代替的index.html和index.php文件 [英] how to make default page home.php instead of index.html and index.php

查看:636
本文介绍了如何使默认页面home.php代替的index.html和index.php文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我的网站 http://mywebsite.com 如果我打这个URL它需要的index.php index.html作为默认页面。我怎样才能让home.php默认页面。 我曾经试过,但不工作通过将以下code里面的public_html的.htaccess文件

  DirectoryIndex的home.php的index.html的index.php
 

解决方案

您只需要 home.php 的DirectoryIndex 做它的工作原理。请记住,这是用在你的根项目的.htaccess文件:

 的DirectoryIndex home.php
 

I have website http://mywebsite.com If I hit this URL it take index.php and index.html as default page. How can I make home.php as default page. I have tried this but not working by placing following code inside .htaccess file of public_html

DirectoryIndex home.php index.html index.php

解决方案

You just need home.php in your DirectoryIndex to make it works. Remember that this is using in .htaccess file of your root project:

DirectoryIndex home.php

这篇关于如何使默认页面home.php代替的index.html和index.php文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆