Apache: Set the order in which the homepage runs indexhtml indexphp

WBOY
Release: 2016-07-29 09:11:45
Original
2032 people have browsed it

Reposted from: http://blog.sina.com.cn/s/blog_a345dd4c01011wug.html

Edit the httpd.conf file, find DirectoryIndex and add an index.php at the end.
For example, I changed the DirectoryIndex line to: DirectoryIndex index.html index.htm index.php index.html.var
Save the edited content and restart Apache to achieve it.

DirectoryIndex index.html index.htm index.php index.php3

If you still cannot run the homepage in order after the above settings, you must modify the php related configuration file php. conf
The
DirectoryIndex index.php
in the /etc/httpd/conf.d/php.conf file is even index.php first. If DirectoryIndex index.php is removed, index.html should also be changed to DirectoryIndex index.html or DirectoryIndex index.html index.php

The above introduces Apache: setting the order of running indexhtml indexphp on the homepage, including Apache content. I hope it will be helpful to friends who are interested in PHP tutorials.

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template