Page is a not externally linkable
- WebmasterWorld
-- Webmaster General
---- Does on-page 301 redirect code substitute for IIS version?


jastra - 5:12 pm on Sep 16, 2010 (gmt 0)


In an emergency, when I couldn't get into IIS on a shared Windows server, I used on-page code for a 310 redirect instead of what I assume is the preferred way-- through IIS.


<%@ Language=VBScript %>
<%
Response.Status="301 Moved Permanently"
Response.AddHeader "Location", "http://www.new-location.com"
%>

I redirected hundreds of obsoleted but indexed pages using this ASP page:
http://example.com/directoryname/listings.asp

It works. All those pages that were indexed in Google are now redirecting to my new page.

And the check server header tool says
HTTP/1.1 301 Moved Permanently

Is this all I need to do to keep from losing all that prior content, or should I find a Web host where I can get into IIS and do it the old fashioned way?


Thread source:: http://www.webmasterworld.com/webmaster/4202880.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com