Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Friendly URLS in MVC 2 application

Posted on 2010-09-02
6
Medium Priority
?
516 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
Veeam Task Manager for Hyper-V

Task Manager for Hyper-V provides critical information that allows you to monitor Hyper-V performance by displaying real-time views of CPU and memory at the individual VM-level, so you can quickly identify which VMs are using host resources.

 
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 2000 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Just a quick little trick I learned recently.  Now that I'm using jQuery with abandon in my asp.net applications, I have grown tired of the following syntax:      (CODE) I suppose it just offends my sense of decency to put inline VBScript on a…
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

972 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