Forum Moderators: phranque

Message Too Old, No Replies

How to implement 301 redirect on an IIS (ASP) site

301 redirect needed for an IIS-based site

         

websage

12:49 am on Feb 19, 2004 (gmt 0)

10+ Year Member



Hello, a new client has default.asp which redirect automatically to a shopping card-driven content area like this:

<% link="http://www.website.com/shop/mydefault.asp" %>
<% response.Redirect(link) %>

Is this SE-friendly way to redirect? If not, how does one implement an ASP version of 301 Redirect for the default page?

Thanks in advance,

Mitko / WebSage

skipfactor

12:52 am on Feb 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<%
Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.newdomain.com/"
Response.End
%>

websage

12:59 am on Feb 19, 2004 (gmt 0)

10+ Year Member



Thanks! I take it, this is the way to do it for both classic ASP and ASP.NET?