As far as I know, add the following phrase to the. htaccess or Apache config file:
ErrorDocument 404 /missing.html(Note: I have created this file)
Then, when we enter a URL that does not exist, the missing.html page appears.
Then I tried again, writing the following code in the test.php:
Discovery does not show missing.html pages.
So I'm going to ask, how do we show it?
Or, am I wrong to write like this? Why?
Actually, header('HTTP/1.1 404 Not Found'); what's the use?
PHP Novice, I hope you hero pointing, thank you!
Reply content:
As far as I know, add the following phrase to the. htaccess or Apache config file:
ErrorDocument 404 /missing.html(Note: I have created this file)
Then, when we enter a URL that does not exist, the missing.html page appears.
Then I tried again, writing the following code in the test.php:
Discovery does not show missing.html pages.
So I'm going to ask, how do we show it?
Or, am I wrong to write like this? Why?
Actually, header('HTTP/1.1 404 Not Found'); what's the use?
PHP Novice, I hope you hero pointing, thank you!
HTTP status code: http://baike.sogou.com/v78674 ...
The errordocument in Apache configuration is to use a page to display the corresponding error status information, not jump. Jump please use 302,301 or JS, HTML Meta Refresh
Web server Configuration