Home >Backend Development >PHP Tutorial >IIS: Set up 404 error page under IIS 8.5_PHP tutorial

IIS: Set up 404 error page under IIS 8.5_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:28:52787browse

IIS version: IIS 8.5

Problem Description

Build a test website with a total of 2 pages (index.php and 404.php). The default homepage is: index.php

When accessing index.php and 404.php, the IIS server can respond normally, indicating that there is no problem configuring the PHP environment in IIS 8.5.

Visit index.php

Visit 404.php

In addition, my error page configuration results are as follows:

Under normal circumstances, when accessing a page that does not exist (for example: 127.0.0.1/aaa.php), at this time, the iis server finds that the file aaa.php does not exist, so a 404 should be requested. php

That is: 127.0.0.1/aaa.php--->127.0.0.1/404.php

However, when I accessed 127.0.0.1/aaa.php, the following error was reported:

Solution

Double-click the "Error Page" setting--> Select the option with status code 404--> Select "Edit Function Settings" in the action bar on the right--> Check "Custom Error Page"

As shown below:

Original address: Was a civil engineer

Please indicate the source for reprinting: http://www.cnblogs.com/hongfei/p/3765771.html

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/780026.htmlTechArticleIIS version: IIS 8.5 Problem description Build a test website with a total of 2 pages (index.php and 404. php), the default homepage is: index.php When accessing index.php and 404.php, the IIS service...
Statement:
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