1

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.

3 Answers 3

2

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.

Sign up to request clarification or add additional context in comments.

2 Comments

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?
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.
1

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

Comments

1

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 = ""} _
)

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.