Xmapp 404 Settings

Source: Internet
Author: User

The advantage of this is that one is very friendly, the other is for your site will be more secure, if not set, someone else in your url after entering a random path, will show a 404 error, and will show your server version number, server configuration at a glance, in order to avoid this situation, you can set the error page.
When a 404 error occurs, that is, when the page is not found, the visitor is imported to a pre-defined error page.
Modify Httpd.conf
Found it:
#ErrorDocument "The server made a boo boo."
#ErrorDocument 404/missing.html
#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 xxxxxxx
This part of httpd.conf, #ErrorDocument 404/missing.html is to display the error page information, remove the previous #
Modified to ErrorDocument 404/error.htm,
Where error.htm is an error file under the site root directory and the error directory, you need to build it yourself. When a 404 error occurs, go to the error.htm page and you can be prompted that the page is not found. This makes it impossible to see your server software information. You can also set other error-oriented pages, specific HTTP response error number please refer to the relevant information.
Restart Apache, if no accident, at this time has been installed successfully, put static page in the site root and error directory, see if it can be successfully resolved. Just enter one: http://localhost/abcd.htm, see is not the guide you set the 404 error, that is, error.htm error page.

Baidu to this method, configured to restart Apache after found not ...
Looking for a half day to see the include "conf/extra/httpd-multilang-errordoc.conf" this similar statement.
Found it in the conf/extra/httpd-multilang-errordoc.conf file.
ErrorDocument 400/error/http_bad_request.html.var
ErrorDocument 401/error/http_unauthorized.html.var
ErrorDocument 403/error/http_forbidden.html.var
ErrorDocument 404/404error.html
ErrorDocument 405/error/http_method_not_allowed.html.var
ErrorDocument 408/error/http_request_time_out.html.var
ErrorDocument 410/error/http_gone.html.var
ErrorDocument 411/error/http_length_required.html.var
ErrorDocument 412/error/http_precondition_failed.html.var
ErrorDocument 413/error/http_request_entity_too_large.html.var
ErrorDocument 414/error/http_request_uri_too_large.html.var
ErrorDocument 415/error/http_unsupported_media_type.html.var
ErrorDocument 500/error/http_internal_server_error.html.var
ErrorDocument 501/error/http_not_implemented.html.var
ErrorDocument 502/error/http_bad_gateway.html.var
ErrorDocument 503/error/http_service_unavailable.html.var
ErrorDocument 506/error/http_variant_also_varies.html.var
The original was covered.
After you get rid of it, reboot Apache and then OK ....
I installed the XAMPP integrated environment

Xmapp 404 Settings

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.