Google Answers Logo
View Question
 
Q: Changing page types, keeping search listings. ( Answered 5 out of 5 stars,   0 Comments )
Question  
Subject: Changing page types, keeping search listings.
Category: Computers > Internet
Asked by: assimilator-ga
List Price: $10.00
Posted: 08 Apr 2003 20:06 PDT
Expires: 08 May 2003 20:06 PDT
Question ID: 188048
I am in the process of converting an existing website to active server
pages.  For many of the pages, besides some content the only change
will be the .htm suffix to an .asp suffix.
  Many of the pages already have high listings in search engines,
including google. :-)
  I will be keeping the old pages available for a while, but they will
not be of any value to the surfer, they will need to go to the .asp
page to make a purchase. What is going to be the best way to make
these changes and keep my search engine listings?  I need a way that
will be a smooth trasition for a customer coming from an existing
search engine listing, but without doing something that I may be
penalized for.
Answer  
Subject: Re: Changing page types, keeping search listings.
Answered By: mosquitohawk-ga on 12 Apr 2003 04:46 PDT
Rated:5 out of 5 stars
 
Greetings assimilator,

I have your answer for you, it relies on a file called 'default.asa'
which should go in the root folder of your website. Open your favorite
text editor, and place the following in it, save it as 'default.asa'
and FTP it to your root directory of your website:

<%
Dim page
Dim length
page = Request.ServerVariables("SCRIPT_NAME")
length = len(Request.ServerVariables("SCRIPT_NAME")) - 3

If right(page,3) = "htm" Then 

Response.Redirect (left(page,length) & "asp")

End If
%>

This will tell the server, if it received a request for filename.htm
to attempt to forward it to filename.asp. The important thing to keep
in mind here, is to attempt as much as possible to preserve the
filename before the .

You can find more information about ASP programming at
http://www.w3schools.com/asp/default.asp

Hope you found this helpful, please remember to ask for clarification
if you need it before rating my answer.

Best regards,

mosquitohawk-ga

Request for Answer Clarification by assimilator-ga on 15 Apr 2003 12:16 PDT
Mosquitohawk, thank-you for your response. I added this file just as
listed and it does not seem to work.  To qualify that, I have
installed it on my local server, and am viewing the site through my
browser, but am looking at my local copy.  Would this make any
difference? Shouldn't it work the same regardless of where it resides?
 An additional clarification; I appreciate the referenced link,
however I could not find information specific to this file, could you
direct me to it?
Thanks again

Clarification of Answer by mosquitohawk-ga on 17 Apr 2003 07:50 PDT
Hi assimilator,

I've come up with a much easier solution for you. In each .htm page
you are converting to .asp, simply place this in the <head> area of
the .htm page (you can remove all other content after creating the
.asp file and have something like this:

<html>
<head>
<meta http-equiv="refresh"
content="0;URL=http://www.domain.com/index.asp">
</head>
<body>
You will be redirected shortly to our new page.
</body>
</html>

This will cause anyone accessing that particular page to be redirected
to the url you put in the <meta> tag. Do this for each .htm file and
change the url and you will get what you're wanting. Also, this will
help you using your site statistics to determine when no one is
accessing the .htm tags any more and you could then delete them to
save your space.

Hope this idea is better for you.
assimilator-ga rated this answer:5 out of 5 stars and gave an additional tip of: $5.00
mosuitohawk,
Thank-you so much. This works perfectly, and is exactly what I was
looking for. I appreciate the effort!

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy