How to change the default index.php on the homepage to index.html: First find the file [httpd.conf] in the apache directory; then remove the [#] symbol at the beginning of each line; finally change DirectoryIndex to [DirectoryIndex index.php].
How to change the default index.php on the homepage to index.html:
First of all, what server are you using? , is it IIS or apache
1. IIS is like this
2. apache server
In the Apache directory after you installed it, there is a conf directory. In this directory, there is a "httpd.conf" file. What we have to do is to modify this file.
In this file, Every line starting with "#" is invalid. If you want your settings to work, you must remove the "#" at the beginning of the line.
Find the DirectoryIndex section. Change it Into DirectoryIndex index.php
index.html In this way, the default homepage of your website directory is index.php. If there is no index.php, the system will automatically look for index.html and html
is used as the default homepage.
Note: There must be a space between index.php index.Html
Related learning recommendations: php programming(video)
The above is the detailed content of How to change the default index.php on the homepage to index.html. For more information, please follow other related articles on the PHP Chinese website!