Link to home
Start Free TrialLog in
Avatar of jahlife
jahlifeFlag for United States of America

asked on

Change ASP Response.Redirect from 302 to 301

Right now, our response.redirect commands are generating a 302 response code.  We need to code, in ASP, a response.redirect stmt so that it returns a status code = 301 instead of 302.  We can test using fiddler.exe, to verify the return code is 301.

Any ASP/VBScript or javascript example will be very useful.

Greetings.
Avatar of jahlife
jahlife
Flag of United States of America image

ASKER

Here is a sample trace of current status. note the second redirect that we want to alter for 301:

SEO Consultants Directory Check Server Headers - Single URI Results
Current Date and Time: 2008-05-23T12:19:54-0700
User IP Address: 64.147.222.37

#1 Server Response: http://bizamajig.com
HTTP Status Code: HTTP/1.1 301 Moved Permanently
Connection: close
Content-Length: 149
Date: Fri, 23 May 2008 19:19:55 GMT
Location: http://www.bizamajig.com//
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Redirect Target: http://www.bizamajig.com//

#2 Server Response: http://www.bizamajig.com//
HTTP Status Code: HTTP/1.1 302 Object moved
Connection: close
Content-Length: 130
Date: Fri, 23 May 2008 19:19:55 GMT
Location: bizamajig
Content-Type: text/html
Server: Microsoft-IIS/6.0
X-Powered-By: ASP.NET
Set-Cookie: ASPSESSIONIDQSBQCQDC=MOOHBJIDHHHPJBKPIJOJFDNC; path=/
Cache-control: private
Redirect Target: bizamajig
ASKER CERTIFIED SOLUTION
Avatar of hielo
hielo
Flag of Wallis and Futuna image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jahlife

ASKER

Replace "response.redirect" with above tonic?
Place what I gave you at the top of your asp page. If your page already contains
<%@ Language=VBScript %>

don't include it again.
Avatar of jahlife

ASKER

Hielo, thanks everytime.