Steps to ask for PHP 404 page definition

Source: Internet
Author: User
How to ask for PHP 404 page definition
This is the case:

The first is to try to define a 404 page in the local apache+mysql+php environment, create a 404.html in the root directory, and then create a. htaccess file, reference content:

Rewriteengine on
ErrorDocument 404/404.html

Baidu is basically said by the definition of this, and then I restarted Apache, try to access the root directory of the next nonexistent directory, url/aaaa/, the result address bar did not jump to similar to url/404.html such an address up, but its content is really 404. HTML-defined error messages;

Then I iis7 on the server by Baidu said definition properties, such as custom error, and then to url,/404.html, and then try to access the non-existent directory, the appearance of the same state as above,

is not suppose to access a nonexistent directory url/aaaa/, the address bar will jump to url/404.html like this,

Here to ask you friends, more advice! Thank you!
------to solve the idea----------------------
is not suppose to access a nonexistent directory url/aaaa/, the address bar will jump to url/404.html like this,

No!
When the accessed file does not exist, it returns 404 of the contents of the specified file and does not change the URL. Because no jumps occurred
It's like you're in index.php. Include other files, although the page shows the contents of other files, but the index.php in the address bar will not change the same
  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.