关于301和404的疑问 301 永久重定向新地址由 location 项指示404 页面不存在 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 版主可能没明白我的意思,正常xx.com/4545456454 这是个无效路径,正常应该要返回的是404页面,可是我的网站返的是301。 我没有不明白你的意思301 是按照域名跳转的,等转到 Location: http://www.10086fj.net 后,才会有 404先看$url = 'http://10086fj.net/';print_r(get_headers($url));Array( [0] => HTTP/1.1 301 Moved Permanently !先是 301 跳转 [1] => Content-Type: text/html; charset=UTF-8 [2] => Location: http://www.10086fj.net/ !目标地址 [3] => Server: Microsoft-IIS/7.5 [4] => X-Powered-By: ASP.NET [5] => Date: Thu, 31 Jul 2014 07:59:21 GMT [6] => Connection: close [7] => Content-Length: 146 [8] => HTTP/1.1 200 OK !正常到达 [9] => Content-Type: text/html; charset=gb2312 [10] => Server: Microsoft-IIS/7.5 [11] => X-Powered-By: PHP/5.2.17 [12] => X-Powered-By: ASP.NET [13] => Date: Thu, 31 Jul 2014 07:59:24 GMT [14] => Connection: close [15] => Content-Length: 17690)再看$url = 'http://10086fj.net/123';print_r(get_headers($url));Array( [0] => HTTP/1.1 301 Moved Permanently !先是 301 跳转 [1] => Content-Type: text/html; charset=UTF-8 [2] => Location: http://www.10086fj.net/123 [3] => Server: Microsoft-IIS/7.5 [4] => X-Powered-By: ASP.NET [5] => Date: Thu, 31 Jul 2014 08:02:24 GMT [6] => Connection: close [7] => Content-Length: 149 [8] => HTTP/1.1 404 Not Found !到达后出错 [9] => Cache-Control: private [10] => Content-Type: text/html; charset=utf-8 [11] => Server: Microsoft-IIS/7.5 [12] => X-Powered-By: ASP.NET [13] => Date: Thu, 31 Jul 2014 08:02:24 GMT [14] => Connection: close [15] => Content-Length: 5092) get_headers(url)不就可以返回参数? 你 http://www.10086fj.net/123 他不就直接 404 了吗? 关于PHP字符URL转换的问题。 请各位高手过来看看 dede跟discuz!x1整合注册登录问题 是哪个dll提供了ocilogon()等函数? php 函数引用"&"问题. COOKIE的问题 美工用div层做出来的界面,我不知道怎么弄了,烦 怎样保证 PHP+MYSQL+AJAX 开发的web程序在 IE 和 FireFox 上都可以正常运行? 内存不可写的错务是怎么回事?之后页面就空了,win2k下或nt 求助!!php读取mdb文件出错,Fatal error: in E:。。。。。。 mysql 向数据库中插入一项数据 碰到个问题,用网上提供的方法都不好用,求教
301 是按照域名跳转的,等转到 Location: http://www.10086fj.net 后,才会有 404先看$url = 'http://10086fj.net/';
print_r(get_headers($url));Array
(
[0] => HTTP/1.1 301 Moved Permanently !先是 301 跳转
[1] => Content-Type: text/html; charset=UTF-8
[2] => Location: http://www.10086fj.net/ !目标地址
[3] => Server: Microsoft-IIS/7.5
[4] => X-Powered-By: ASP.NET
[5] => Date: Thu, 31 Jul 2014 07:59:21 GMT
[6] => Connection: close
[7] => Content-Length: 146
[8] => HTTP/1.1 200 OK !正常到达
[9] => Content-Type: text/html; charset=gb2312
[10] => Server: Microsoft-IIS/7.5
[11] => X-Powered-By: PHP/5.2.17
[12] => X-Powered-By: ASP.NET
[13] => Date: Thu, 31 Jul 2014 07:59:24 GMT
[14] => Connection: close
[15] => Content-Length: 17690
)再看$url = 'http://10086fj.net/123';
print_r(get_headers($url));Array
(
[0] => HTTP/1.1 301 Moved Permanently !先是 301 跳转
[1] => Content-Type: text/html; charset=UTF-8
[2] => Location: http://www.10086fj.net/123
[3] => Server: Microsoft-IIS/7.5
[4] => X-Powered-By: ASP.NET
[5] => Date: Thu, 31 Jul 2014 08:02:24 GMT
[6] => Connection: close
[7] => Content-Length: 149
[8] => HTTP/1.1 404 Not Found !到达后出错
[9] => Cache-Control: private
[10] => Content-Type: text/html; charset=utf-8
[11] => Server: Microsoft-IIS/7.5
[12] => X-Powered-By: ASP.NET
[13] => Date: Thu, 31 Jul 2014 08:02:24 GMT
[14] => Connection: close
[15] => Content-Length: 5092
)
不就可以返回参数?