日期:2014-05-16  浏览次数:20511 次

类似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这个路劲的就按照你那个跳转 ,这样你试过没有?