0

Hi Everyone,

I want to do 301 redirect from the old asp.net webforms website hosted in IIS6 to the asp.net mvc 3 application hosted in same server.Following are the urls that i would like to redirect to the new urls.

http://oldsite.com/blog/888-miso-collapsible-origami-tables.aspx => www.somesite.com/postdetails/miso-collapsible-origami-tables

http://oldsite.com/blog.aspx?tag=art => www.somesite.com/Blog/TagPosts?tag=art&tagPostType=1

http://oldsite.com/blog.aspx?month=2012-3&p=2 =>www.somesite.com

How do i set up the matching route for the above to the new site and make a 301 redirect.I don't know how to match the url with query string to my asp.net mvc 3 webapplication.What would be the route like be in my new mvc application and do i need to make changes in the web.config of my new application?

Thanks in advance,
S.

2
Contributors
1
Reply
5
Views
5 Years
Discussion Span
Last Post by LastMitch
0

How do i set up the matching route for the above to the new site and make a 301 redirect.I don't know how to match the url with query string to my asp.net mvc 3 webapplication.What would be the route like be in my new mvc application and do i need to make changes in the web.config of my new application?

You need to used the code from this link:

http://msdn.microsoft.com/en-us/library/cc668177%28v=vs.100%29.aspx

You can take a look at this article explain how to used 301 redirected:

http://weblogs.asp.net/jeffwids/archive/2010/01/31/how-to-301-permanent-redirect-in-asp-net.aspx

It's the same question you mention from the other thread (I do feel it is related) :

http://www.daniweb.com/web-development/aspnet/threads/430917/pass-url-data-to-new-site-on-301-permanent-redirect

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.