Reputation: 6612
I am using url routing feature ( http://msdn.microsoft.com/en-us/magazine/dd347546.aspx ) in my asp.net 3.5 sp1 website. I am wondering that is it same as 301 redirects? what I want is a 301 redirects from my old asp pages to new aspx pages.
Upvotes: 0
Views: 252
Reputation: 5594
No, you cannot use the routing feature for asp classic pages redirect. You could configure iis to do this.
Upvotes: 1
Reputation: 17010
The routing you pointed to is a mapping to a page that handles the request. Look at the example:
RouteTable.Routes.Add(
"Recipe",
new Route("recipe/{name}",
new RecipeRouteHandler(
"~/WebForms/RecipeDisplay.aspx")));
What this sets up is taking a URI like http://mysite.com/recipe/grits and routes it to http://mysite.com/WebForms/RecipeDisplay.aspx?name=grits (or similar). This is done server side, not client side, like a 301.
If you want to redirect a user, you need to map that in the server.
Upvotes: 1