Solved

Friendly URLS in MVC 2 application

Posted on 2010-09-02
6
510 Views
Last Modified: 2013-12-17

Hi There,

I would like to find out the best way to render friendly URLS in my MVC 2 application. Can anyone post some code for this.

I'm wanting a url like http://www.mydomain.com/some-folder/some-file.aspx.

Thanks in advance,

Sean
0
Comment
Question by:MrAgile
  • 2
  • 2
  • 2
6 Comments
 
LVL 15

Expert Comment

by:AmmarR
ID: 33585514
0
 
LVL 27

Expert Comment

by:nmarun
ID: 33585670
Sean,

MVC does provide user-friendly urls by default. So the MVC url might look something like:

http://site.com/product/edit/123
as against
http://site.com/EditProduct.aspx?id=123

The second one is how WebForms do it. Another benefit of the first one is that search engines can cache these urls, but not the latter one. I'm sure you agree that something like:
http://site.com/products/display/laptops

is a lot more intuitive than
http://site.com/DisplayProducts.aspx?id=72

So, I'm not sure what exactly you mean by user-friendly urls. Please explain.

Arun
0
 
LVL 8

Author Comment

by:MrAgile
ID: 33594211
Hi Nmarun, looking for seo friendly urls in particular. Something like mydomain.com/my-folder/my-page/

Does this make sense?
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 
LVL 15

Expert Comment

by:AmmarR
ID: 33605916
Dear MrAgile:

when i go to the link you mentioned, i get 404 error and the page redirects again
404.png
0
 
LVL 27

Accepted Solution

by:
nmarun earned 500 total points
ID: 33606580
0
 
LVL 8

Author Comment

by:MrAgile
ID: 33655476
Hi Arun,

The link I gave you was just in the format I required. Thanks for the links above, that's exactly what I was after.

Sean
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

ASP.Net to Oracle Connectivity Recently I had to develop an ASP.NET application connecting to an Oracle database.As I am doing it first time ,I had to solve several problems. This article will help to such developers  to develop an ASP.NET client…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

775 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question