As far as I know, add the following sentence to the. htaccess or apache config file: ErrorDocument404missing.html (note: After I have created this file, this missing.html page will appear when we input a nonexistent URL. Then I tried again. in te... as far as I know, add the following sentence to the. htaccess or apache config file:
ErrorDocument 404 /missing.html
(Note: I have created this file)
That is why this missing.html page appears when we enter an nonexistent URL.
Then I tried again and wrote the following code in test. php:
The missing.html page is not displayed.
So I want to ask, how can I display it?
Or, is it wrong for me to write this? Why?
Actuallyheader('HTTP/1.1 404 Not Found');
What is the purpose?
Beginner in PHP. hope you can give me some advice. thank you!
Reply content:
As far as I know, add the following sentence to the. htaccess or apache config file:
ErrorDocument 404 /missing.html
(Note: I have created this file)
That is why this missing.html page appears when we enter an nonexistent URL.
Then I tried again and wrote the following code in test. php:
The missing.html page is not displayed.
So I want to ask, how can I display it?
Or, is it wrong for me to write this? Why?
Actuallyheader('HTTP/1.1 404 Not Found');
What is the purpose?
Beginner in PHP. hope you can give me some advice. thank you!
HTTP status code: http://baike.sogou.com/v78674...
In Apache configuration, ErrorDocument displays the corresponding error status information on a page rather than redirection. Use 302,301 or JS, HTML meta refresh for redirect
Web server configuration