views:

75

answers:

3

Hi

I have a website that we migrated from ASP.NET to MVC Framework.

The url With ASP.NET that used to be Ex: http://Website1/MasterData The URL now with MVC Fraemwork became http://Website1/Home/MasterData.

Now as the users of the site have Bookmarked the old URL, Now we need to maintain the same url. I would appreciate if anyone can provide steps how we can this?

Appreciate your responses.

+2  A: 

Provide a 301 redirect from the old url to the new url.

Or, provide static routes that trap the old urls and route them to the proper controller methods.

Robert Harvey
Seems a little backwards to me. Guess you'd have to do a redirect on everything that came in at the root level and redirect to the same page at the [home] level right?
griegs
Well, use the static routes approach then. But if you use 301 redirects you can train the search engines to refer to the new link, and you won't have any problems with duplicate content messing up your SEO.
Robert Harvey
+1  A: 

You can modify the RegisterRoutes method in the Global.asax.cs file to specify your desired paths.

Ralph Stevens
+1  A: 

You could add a route in Global.asax so that users get the right screen from the old URL:

routes.MapRoute( _
    "OldMasterDataRoute", _
    "/Masterdata", _
    New With {.controller = "Home", .action = "MasterData", .id = ""} _
)
AUSteve