Welcome to WebmasterWorld Guest from

Forum Moderators: ocean10000

Message Too Old, No Replies

Dynamic 301 redirect from old asp site to new asp.net site

Dynamic 301 redirect from old asp site to new asp.net site

4:38 pm on Apr 26, 2007 (gmt 0)

New User

10+ Year Member

joined:Aug 2, 2004
votes: 0

Hello everyone. I've been going nuts about this for awhile, but I just can't find the answer. I'm not a coder, but a script scraper, so I'm dead if I can't do this.

I'm changing a site over from asp to asp.net. One of the problems I'm having is 301 redirecting all of the dynamic urls to their new counterparts. There was only one constant I was able to maintain in the dabase migration, and it was the product table UID (ID's) Those are all the same and the basis for product navigation in both applications.

Well here is my problem. I need to do a 301 redirect from three files:

1. default.asp: (No problem really, just giving you background)

2. prodList.asp: Which are the Category Navigation pages. These look like this:

and finally
3. prodView.asp: which is the product detail view.
These look like this:

For default.asp, just a 301 redirect. Found it here in the forums, no problem.

For prodList.asp, I have to 301 redirect to a corresponding Category page which looks like

I have to do these by hand because the Category ID's are not consistent. I had to re-categorize for better SEO.
So how do I construct an IF/Then statement for the following logic
then redirect to
IF Not
And so on.

And then there is the prodView.asp page. I have to redirect these to like this
both the UID numbers will be the same number.

I'm hoping that I can do this with a couple of lines of code , to make life easier for myself.

Any help. Please! Please! Please! Please!
(I ain't to proud to beg)

6:31 pm on May 14, 2007 (gmt 0)

New User

10+ Year Member

joined:Oct 2, 2006
posts: 7
votes: 0

What you need to do is read the querystring.


Dim catid
catid = Request.Querystring("CategoryID")
Response.Redirect("SearchResult.aspx?CategoryID=" + catid)

-- end code --