Solved

Friendly URLS in MVC 2 application

Posted on 2010-09-02
6
506 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This article describes relatively difficult and non-obvious issues that are likely to arise when creating COM class in Visual Studio and deploying it by professional MSI-authoring tools. It is assumed that the reader is already familiar with the cla…
Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
Here's a very brief overview of the methods PRTG Network Monitor (https://www.paessler.com/prtg) offers for monitoring bandwidth, to help you decide which methods you´d like to investigate in more detail.  The methods are covered in more detail in o…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now