I have 2 websites an old one called www.old.com and a new one called www.new.com . The old url has a 301 permanent redirect to the new website, but the new website has a different maproute so everything is not matching up the old website has the following type of route
routes.MapRoute(
"myroutes",
"{controller}/{action}/{id}/{mytitle}",
new { controller = "buyer", action = "detail",mytitle=UrlParameter.Optional}
);
old.com/buyer/detail/id/mytitle
the new website has the following
routes.MapRoute(
"myroutes",
"{mytitle}/buyer/{id}",
new
{
controller = "buyer",
action = "detail",
id = UrlParameter.Optional,
});
new.com/mytitle/buyer/id
So when someone goes to the old url they get redirected to my new url but they encounter a 401 error as the Url become new.com/buyer/detail/id/mytitle which offcourse does not exist... How can i in my new URL reroute the old maproutes from the old website. I was thinking it could be done as a check in the controller/action of the new website or in the maproutes redirect it somehow anybody have any ideas?