How to locate a 404 exception? The study was fruitless for nearly three hours. if it was difficult to get rid of it, it would be hard to eat.

Source: Internet
Author: User
How to locate a 404 error? The study was fruitless for nearly three hours. if it was difficult, it would be hard to eat. Www.v.w1.comcan be used. However, if you do not use wc, v.w1.comwctest.html cannot be opened and a 404 error will be returned. But I want to convert all v.w1.comwctest.html to www. mytest. comindex. php? U is similar to error 404. how can I locate it? The study was fruitless for nearly three hours. if it was difficult, it would be hard to eat.

Www.v.w1.com is accessible. However, if the wc path is not available, the error will be returned if http://v.w1.com/wc/test.html is disabled.
However
All http://v.w1.com/wc/test.html are forwarded
Www.mytest.com/index.php? Url = http://v.w1.com/wc/test.html

I tried it several times and there was an endless loop orientation.
My mother of failure:
1. get get_heards. do you have to be able to access it normally?
2. use htaccess. it is difficult to obtain parameters.

Thank you.
------ Solution --------------------
Apache
ErrorDocument 404/404 .php

------ Solution --------------------
Apache
ErrorDocument 404 http://www.mytest.com/index.php


You should first write this to see if it can be executed into index. php.

And then print_r ($ _ SERVER) in the php; according to the general, this array can get the url
------ Solution --------------------
You can use a regular expression to write an rewrite rule. if you match wc, you can jump to the rewrite rule. Have you ever tried this?

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.