Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Migrating static site to ASP.NET - How to handle redirecting old URLs?

Reply
Thread Tools

Migrating static site to ASP.NET - How to handle redirecting old URLs?

 
 
ITistic
Guest
Posts: n/a
 
      06-12-2007
I am about to start on a migration from a static HTML site to an
ASP.NET solution. I've done a ton of these in the past as my primary
job duty is developing ASP.NET sites. This is the first project I've
come across for a site that has quite a few .HTM pages with good
search engine ranking. I want to make sure I do everything I can to
retain those rankings at least as far as the URLs are concerned. What
I want to do is make sure that when an old .HTM URL is requested that
the system 301 redirects to the equivalent ASP.NET page. My initial
thought is to create a database table of all the OLD virtual URLs
(ex: /products/product1/index.htm) and the new ASP.NET URL that they
should be redirected to. I could then set ASP.NET to process .HTM
pages and use a custom 404 handler to perform the redirection. Is this
the best way? Even if you think it is, what other solutions have you
used that may be easier or better?

 
Reply With Quote
 
 
 
 
RSH
Guest
Posts: n/a
 
      06-12-2007
I have used redirects in IIS as well as custom redirects in the Global.asax
file basically error trapping the page not found error and forwarding them
to the new page.

Sub Application_Error(ByVal sender As Object, ByVal e As EventArgs)

strErr = Server.GetLastError.ToString()

If InStr(strErr, "System.IO.FileNotFoundException:") > 0 Then

If InStr(UCase(strErr), "\SERVICES\") > 0 Then

Response.Redirect("/EmployerSolutions_Main.aspx")

ElseIf InStr(UCase(strErr), UCase("\About\")) > 0 Then

Response.Redirect("/About.aspx")

ElseIf InStr(UCase(strErr), UCase("\Accountants\")) > 0 Then

Response.Redirect("/IndustrySolutions_AccountingProfessionals.aspx")

End Sub



"ITistic" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) oups.com...
>I am about to start on a migration from a static HTML site to an
> ASP.NET solution. I've done a ton of these in the past as my primary
> job duty is developing ASP.NET sites. This is the first project I've
> come across for a site that has quite a few .HTM pages with good
> search engine ranking. I want to make sure I do everything I can to
> retain those rankings at least as far as the URLs are concerned. What
> I want to do is make sure that when an old .HTM URL is requested that
> the system 301 redirects to the equivalent ASP.NET page. My initial
> thought is to create a database table of all the OLD virtual URLs
> (ex: /products/product1/index.htm) and the new ASP.NET URL that they
> should be redirected to. I could then set ASP.NET to process .HTM
> pages and use a custom 404 handler to perform the redirection. Is this
> the best way? Even if you think it is, what other solutions have you
> used that may be easier or better?
>



 
Reply With Quote
 
 
 
 
bruce barker
Guest
Posts: n/a
 
      06-12-2007
just map .htm to asp.net and keep the same file names. there is nothing
really special about using .aspx, it just a convention

-- bruce (sqlwork.com)


ITistic wrote:
> I am about to start on a migration from a static HTML site to an
> ASP.NET solution. I've done a ton of these in the past as my primary
> job duty is developing ASP.NET sites. This is the first project I've
> come across for a site that has quite a few .HTM pages with good
> search engine ranking. I want to make sure I do everything I can to
> retain those rankings at least as far as the URLs are concerned. What
> I want to do is make sure that when an old .HTM URL is requested that
> the system 301 redirects to the equivalent ASP.NET page. My initial
> thought is to create a database table of all the OLD virtual URLs
> (ex: /products/product1/index.htm) and the new ASP.NET URL that they
> should be redirected to. I could then set ASP.NET to process .HTM
> pages and use a custom 404 handler to perform the redirection. Is this
> the best way? Even if you think it is, what other solutions have you
> used that may be easier or better?
>

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How include a large array? Edward A. Falk C Programming 1 04-04-2013 08:07 PM
Migrating old boot drive to new MOBO. ian field Computer Support 6 03-06-2010 02:21 PM
Embedding, "import site", PYTHONHOME, and an old, old issue Jim Hill Python 3 02-12-2007 06:27 PM
migrating my old OE '98 to new pc OE with XP Quiz Time Computer Support 4 05-22-2004 08:52 PM
migrating email from old win98 pc to new win xp pc.... HOW? Ano Computer Support 2 11-25-2003 06:37 PM



Advertisments