Forum Moderators: phranque

Message Too Old, No Replies

Redirection code 301

         

nmottet

11:57 pm on Jun 24, 2003 (gmt 0)

10+ Year Member



------------------------------
JuDDer in Google News Archives:

The correct method for a 301 permanent redirect with ASP is:

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

------------------------------

Judder (or anybody who can help), could you let me know what 301 code to use for an HTML page? or is it similar?
and where should I insert this code?

Thanks!
Nick

DaveAtIFG

5:50 pm on Jun 25, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I don't speak ASP but it looks as if you simply need to substitiute the URL you want to redirect to into:
Response.AddHeader "Location", "http://www.newdomain.com/newurl/"

For example, to return a 301 for mypage.html, use:
Response.AddHeader "Location", "http://www.mydomain.com/mypage.html"

quiet_man

6:30 pm on Jun 25, 2003 (gmt 0)

10+ Year Member



Nick - not sure exactly what you're asking. If its not ASP, then you might want to look at this thread:

An introduction to redirecting URLs on an Apache server [webmasterworld.com]