0

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.

2 Answers 2

1

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.

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

Comments

1

No, you cannot use the routing feature for asp classic pages redirect. You could configure iis to do this.

4 Comments

I want to make it in the code behind rather than configuring IIS. Is there any other way?
To use the routing feature for an asp classic page, this should be processed by asp.net engine, and i don't this is possible.
I want to make it SEO friendly. I mapped my asp page to new aspx but on the url it still shows the asp page url, so for SEO they are still two different pages? Sorry for bothering but I am confused with these things.
I suggest you to use a different approach: for classic asp you can try a URL Rewrite component such as ISAPI_Rewrite isapirewrite.com

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.