ASP Response.Status设置不正确

ASP Response.Status设置不正确

问题描述:

我使用的是传统的ASP,需要一个URL重定向与301以下状态代码是我使用的代码:ASP Response.Status设置不正确

response.clear 
Response.Status="301 Moved Permanently" 
Response.AddHeader "Location", "http://www.frickingnutz.com" 
Response.redirect ("http://www.frickingnutz.com") 
response.end 

然而,当我使用一个许多“头”检查网站,我发现,IIS将返回302个状态码:

HTTP/1.1 302 Object moved => 
Server => Microsoft-IIS/5.0 
Date => Mon, 24 Jan 2011 14:20:08 GMT 
X-Powered-By => ASP.NET 
Location => http://www.frickingnutz.com 
Connection => Keep-Alive 
Content-Length => 148 
Content-Type => text/html; Charset=UTF-8 
Set-Cookie => ASPSESSIONIDACCTDCSS=NLPNLBHCFEBAPMPODJPMDNMB; path=/ 
Cache-control => private 

事实上,我不能强迫任何状态代码在所有的,我尝试过各种不同的人作为试验,所有我能得到的是302.

我怀疑这是一些IIS设置,但找不到任何东西。

OK ..我只是想通了!

并不需要行

Response.redirect ("http://www.frickingnutz.com") 

位置头中的一部分。卫生署!