High Rankings Search Engine Optimization ForumHigh Rankings Advisor Search Marketing Newsletter

Welcome Guest ( Log In | Register )

Important Announcement: ***Need an Affordable SEO Website Review?***
3 Pages V   1 2 3 >  
Reply to this topicStart new topic
> Another Redirection Issue, Redirection of .htm pages
dpasc
post May 25 2006, 02:22 AM
Post #1


HR 1
*

Group: Members
Posts: 2
Joined: 25-May 06
User's local time:
Feb 9 2010, 10:00 PM
Member No.: 11,880



I have a number of .htm pages that are indexed by the search engines. Those pages have been obsoleted and replaced by others with similar url name and content.

My purpose now is twofold:

1. Redirect the traffic through the old pages to my home page
2. Prevent search engines of assuming duplicate content

The problem is that I'm using extenal Windows hosting and the only access I have to the IIS is that of creating custom error pages. In addition, since the pages are .htm I cannot use vbscript for server redirection and any html refreh may be seen as spam by the search engines.

I thought of deleting the obsolete pages and create a custom 404 error page -let's say 404.asp- putting the following code in it:

Response.Status = "301 Moved Permanently"
Response.AddHeader "Location", "http://www.mydomain.com"

The question is: Will search engines associate the responded status with the requested page that has been removed?

If not (in case that they associate the 301 to the 404.asp itself) will they see 404 or 200 for the requested page? The 200 is what I really want to avoid here.
Go to the top of the page
 
+Quote Post
lcesario
post May 25 2006, 08:51 AM
Post #2


HR 1
*

Group: Members
Posts: 3
Joined: 19-November 03
User's local time:
Feb 9 2010, 04:00 PM
Member No.: 1,360



So glad to see your post about 301 redirects on IIS with .htm pages, as we're in the same boat.

Unfortunately, our host is no help...they won't allow ISAPI_rewrite or any server side solutions. Like you, the only thing we can modify is 400 level error pages. Everything I've read says "Meta Refresh" is treated as spam.

I've had someone suggest the possibility of a javascript solution at the top of each old page, or maybe a modification to the global.asa file. Does anyone know if this would work? If so, can you please give an example??

I'm desperately looking for the best way to handle this, as we have some GREAT rankings(thanks Jill!), that I don't want to lose with the restructuring of our website.

Many thanks!
Lcesario
Go to the top of the page
 
+Quote Post
Jill
post May 25 2006, 09:30 AM
Post #3


High Rankings Advisor
Group Icon

Group: Admin
Posts: 29,201
Joined: 21-July 03
User's local time:
Feb 9 2010, 02:00 PM
From: Ashland, MA
Member No.: 2



Welcome lcesario! (IMG:http://www.highrankings.com/forum/style_emoticons/default/bye1.gif)
Go to the top of the page
 
+Quote Post
dpasc
post May 25 2006, 10:53 AM
Post #4


HR 1
*

Group: Members
Posts: 2
Joined: 25-May 06
User's local time:
Feb 9 2010, 10:00 PM
Member No.: 11,880



Hi lcesario,

I have tried many things but didn't help. My host refered me to their forum but I couldn't fing anything helpful there.

Modification of global.asa works only if someone tries to access your home page. Any other page access attempt will ignore the global.asa.

A for Javascript, my information suggests that any client redirection is seen as spam.

I've used a "Check Server Headers Tool" to test my idea about a custom 404 page that returns a 301 and guess what...it works!

The page is redirected properly returning a 301 code.

Of course this works fine if you just want to redirect all old pages to your home or any other single page. If you want to redirect every old page to its replacement...

I can't really sort it out since the HTTP_REFERER returns the custom error page and not the page requested by the visitor.
Go to the top of the page
 
+Quote Post
chrishirst
post May 25 2006, 04:59 PM
Post #5


HR 9
Group Icon

Group: Moderator
Posts: 4,356
Joined: 13-August 03
User's local time:
Feb 9 2010, 07:00 PM
From: Blackpool UK
Member No.: 492



there are a few things you can do, longer post tomorrow when I'm awake (IMG:http://www.highrankings.com/forum/style_emoticons/default/biggrin.gif)
Go to the top of the page
 
+Quote Post
chrishirst
post May 27 2006, 06:43 PM
Post #6


HR 9
Group Icon

Group: Moderator
Posts: 4,356
Joined: 13-August 03
User's local time:
Feb 9 2010, 07:00 PM
From: Blackpool UK
Member No.: 492



to get the requested URI from the 404 page use request.servervariables("QUERY_STRING") it is prepended with "404:" but a simple replace takes care of that.
Using this means you can do add a bit of code to redirect to the correct page and/or return a 404 as required.

lcesario, can you change the server mappings to parse htm pages as asp ? that is a useful solution for many issues.
Go to the top of the page
 
+Quote Post
lcesario
post May 31 2006, 09:17 AM
Post #7


HR 1
*

Group: Members
Posts: 3
Joined: 19-November 03
User's local time:
Feb 9 2010, 04:00 PM
Member No.: 1,360



Chrishirst,
Thank you for the idea....I felt a fresh wave of hope for a second regarding parsing as asp, until our host said "No" yet again. In fact, they suggested a Meta Refresh solution. I've been so happy with our host, Crystaltech, except for this issue. (IMG:http://www.highrankings.com/forum/style_emoticons/default/cry_smile.gif)

I guess I'll have to explore dpasc's custom 404 asp page idea. I'm not sure I fully understand your comments regarding this in the last post though. Would what you're talking about work for redirecting several pages to the their new URI's?

This post has been edited by lcesario: May 31 2006, 09:32 AM
Go to the top of the page
 
+Quote Post
chrishirst
post May 31 2006, 03:25 PM
Post #8


HR 9
Group Icon

Group: Moderator
Posts: 4,356
Joined: 13-August 03
User's local time:
Feb 9 2010, 07:00 PM
From: Blackpool UK
Member No.: 492



did they give a reason for the No? or is it more a case of "we don't know how to" (IMG:http://www.highrankings.com/forum/style_emoticons/default/biggrin.gif)

QUOTE
Would what you're talking about work for redirecting several pages to the their new URI's?
Yep it certainly will.
I use the 404 pages as part of coding "friendly URLs" for a couple of thousand pages on one site.

the actual means of this working depends on how many pages need redirecting. A few dozen could be done with an 2 dimensional array or a scripting dictionary holding all the page names and the new target. More than 60 or so would be better done with a database of entries.

If the pages are being redirected from page.htm to page.asp a simple replace() function will do, A more complex replace could be handled with a regular expression.
Go to the top of the page
 
+Quote Post
lcesario
post Jun 1 2006, 11:09 AM
Post #9


HR 1
*

Group: Members
Posts: 3
Joined: 19-November 03
User's local time:
Feb 9 2010, 04:00 PM
Member No.: 1,360



My host simply stated that "the issue has been reviewed and turned down by management on numerous occasions....."

Anyway, I'm wondering if you could please give me an example(or point me to a good source) for the VBscript(or Jscript?) that I would use to redirect the following:

"www.mydomain.com/oldpage.htm" to "www.mydomain.com/newdir/newpage.htm"

I haven't counted yet, but I'd bet there's around 50 pages that'll need to be redirected.

The other question that's come up is this: since we're going to be doing all of these redirects anyway....would it be a good idea to just change all of the static .htm pages on the site to dynamic(asp) pages? Do the search engines prefer or rank differently static vs. dynamic pages?

Thanks!
Go to the top of the page
 
+Quote Post
chrishirst
post Jun 1 2006, 02:13 PM
Post #10


HR 9
Group Icon

Group: Moderator
Posts: 4,356
Joined: 13-August 03
User's local time:
Feb 9 2010, 07:00 PM
From: Blackpool UK
Member No.: 492



QUOTE
My host simply stated that "the issue has been reviewed and turned down by management on numerous occasions....."
That's a "we don't care how useful it may be to our users" attitude then (IMG:http://www.highrankings.com/forum/style_emoticons/default/hmm.gif)

Yes, use a .asp extension on your new pages. It will avoid issues like this for the future.
ALL pages are HTML to user agents. "Dynamic" pages to a SE are ones with a querystring in the URI


50 pages aren't a problem with an array

Original code deleted after some bug fixing
CODE
See post #18 for rectified code.

two possibles for this script, If you want to maintain the old URI and keep any rankings, linkpop etc for the page use the server.transfer line of code.
If you are not worried about the rankings glitch that will occur with the redirect use the response.status lines

This post has been edited by chrishirst: Mar 2 2007, 06:39 AM
Reason for edit: removed buggy code
Go to the top of the page
 
+Quote Post
Pacerfan
post Jul 18 2006, 07:15 AM
Post #11


HR 1
*

Group: Members
Posts: 5
Joined: 1-June 06
User's local time:
Feb 9 2010, 03:00 PM
Member No.: 11,975



Hello:

You helped me a few weeks ago with a website conversion issue. I am in the process of converting a site from ASP to .Net and I need to redirect the ASP files to the .ASPX files. I am using the code you posted for the 404 error redirect file, but I keep getting the following error:

Microsoft VBScript runtime error '800a01b6'

Object doesn't support this property or method: 'request'

/error_redirect.asp, line 10

The error is occurring on this line:

request = replace(request.servervariables("QUERY_STRING"),"404;","")

Any ideas? Thanks a lot for your help. I really appreciate it!
Go to the top of the page
 
+Quote Post
chrishirst
post Jul 31 2006, 03:03 AM
Post #12


HR 9
Group Icon

Group: Moderator
Posts: 4,356
Joined: 13-August 03
User's local time:
Feb 9 2010, 07:00 PM
From: Blackpool UK
Member No.: 492



request is a "reserved word" in VbScript so should not be used as a variable name .


My fault for writing code at the keyboard, directly into the forum without testing it first (IMG:http://www.highrankings.com/forum/style_emoticons/default/ohno.gif)
Go to the top of the page
 
+Quote Post
Pacerfan
post Aug 7 2006, 02:05 PM
Post #13


HR 1
*

Group: Members
Posts: 5
Joined: 1-June 06
User's local time:
Feb 9 2010, 03:00 PM
Member No.: 11,975



I have a follow-up question regarding the proposed server.transfer solution. Will the fact that the search engine spiders receive a 404 error before the server.transfer command redirects them to the new pages have a negative impact on my site? I am leaning toward using the server.transfer command and a database table (or xml file) that contains the two file names. However, I want to make sure the server.trannsfer solution is the best fit. Also, what is the advantage of using the server.transfer command over the 301 redirect (response.status = "301 Moved Permanently")

Thanks a lot for your help. I really appreciate it!
Go to the top of the page
 
+Quote Post
chrishirst
post Aug 9 2006, 12:39 PM
Post #14


HR 9
Group Icon

Group: Moderator
Posts: 4,356
Joined: 13-August 03
User's local time:
Feb 9 2010, 07:00 PM
From: Blackpool UK
Member No.: 492



server.transfer immediately transfers processing to another page, the only response a UA will get is a 200 (Ok). The URI does not change as no redirect occurs.

The UA will not get a 404 response because of the fact that a 404 page when set as a URL in IIS will always return a 200 response NOT a 404
Go to the top of the page
 
+Quote Post
smc_online
post Aug 9 2006, 12:59 PM
Post #15


HR 4
****

Group: Active Members
Posts: 266
Joined: 13-August 03
User's local time:
Feb 9 2010, 04:00 PM
From: Tampa, Florida
Member No.: 493



Hey chrishirst,

Just wanted to say a big "THANKS" for your thoughtful posts. Having much regard for techno-bable, I appreciate your responses. They are always useful.


Going off-topic:
Your skill set is one that I noticed that gets overlooked in search marketing venues. Perhaps you should propose to moderate a technology track at SES or Jills HR Seminars. ;o)

Its definitely a topic that gets overlooked!!
Go to the top of the page
 
+Quote Post

3 Pages V   1 2 3 >   
Fast ReplyReply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



This forum is sponsored by High Rankings, a Boston SEO Agency
- Lo-Fi Version Time is now: 9th February 2010 - 02:00 PM