类似404异常,怎么定位?研究近3小时无果,若此难不除,将无心吃饭

WBOY
Release: 2016-06-13 11:56:40
Original
1310 people have browsed it

类似404错误,如何定位?研究近3小时无果,若此难不除,将无心吃饭。

www.v.w1.com是可以访问的,但是,没wc这个路径,故http://v.w1.com/wc/test.html是打不开,会返回一个404错误。
但是
我要实现,把所有的http://v.w1.com/wc/test.html,都转到
www.mytest.com/index.php?url=http://v.w1.com/wc/test.html中

我尝试了数次,出现死循环定向。
我的失败之母:
1.取get_heards吧,必须能正常访问才行啊?
2.用htaccess吧,取参数也不好弄。

谢谢了。
------解决方案--------------------
apache
ErrorDocument 404 /404.php

------解决方案--------------------
apache
ErrorDocument 404 http://www.mytest.com/index.php


你先这么写,看是否能执行到index.php

然后再这个php里面print_r($_SERVER);按常规,这个数组里面能拿到那个url的
------解决方案--------------------
可以用正则表达式写一条重写规则,只要匹配到wc这个路劲的就按照你那个跳转 ,这样你试过没有?

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!