Forum Moderators: phranque
The site in question is on a commercial Win2k/IIS 5 server (not under my server admin control) and I want some old pages to redirect to new replacement pages with different names and content, without losing SE rank, or causing errors for people's bookmarks and via a 301 - so they will eventually be removed from the SEs.
Looked as if ASP code above the <head>, like:
<%@ Language=VBScript %>
<%Option Explicit%>
<%
Response.Status = "301 Permanent Redirect"
Response.Redirect "http://www.mysite.com/newpage.asp"
Response.End
'%>
Was the answer, until I realized that to do this server-side meant renaming the old pages from *.html to *.asp (duhhh...) ...which would break all the old links to them ...which defeats the whole purpose...
XOC's cool IIS 404 handler looked good too, but requires access to the server admin.
.htaccess is also out, on an IIS server. I would rather not use JS and sure don't want a meta tag refresh! So, what's left?
Doesn't every webmaster have to deal with redirecting from obsolete pages without bad SE consequences? There must be a real common fix? right? right? [note of desparation creeping in]
Please tell me I'm missing something simple here.
Also, I don't suppose I could do this client-side by just including the above VBScript (inside LANGUAGE tags, of course) in the body of the HTML page?
Anyway, above workaround works like a charm. Try it.
Starting from line 156, you edit the code.asp file as necessary. TEMP will be a 302 redirect. PERM will be a 301 redirect.
'Populate the redirections as required
ReDirect_Add "/bob", "/rita/", "TEMP", sReDir 'If source page was "/bob" then temporary redirect to "/rita"
ReDirect_Add "/sue", "/dave/", "PERM", sReDir 'If source page was "/sue" then permanent redirect to "/dave"
I checked the Server Header [searchengineworld.com] and it returned the 301 I was expecting on one of my permanent redirect requests.
Really good info!
Since I'm more experienced with ASP, I'll try that route first.
My own hosting service offers custom 404s. Now if my client's service also does, then I'm all set.
Really impressive how many posts WebmasterWorld gets per day nowadays too whew!
I'll report back after I've tried this stuff out, so as to add my results to the searchable knowledge here.
Thanks again...