I am also a web form developer and used 4.0 webfrom routing feature. I recently started a project on umbraco so just wondering, is there possibilities to implementing webform routing as you raised question?
Thanks Nate, I will follow your suggestion and it looks great.
Someone has posted an article to work around the asp.net routing features, I didn't got a chance look into more. Soon I will you updated here if works for me.
URL Routing in Umbraco
I'm trying to setup webforms routing in umbraco.
I have a content page off the route called "ride". I'd like to change it from www.mysite.com/ride?id=12345 to www.mysite.com/ride/12345
I've added the following to a class in the app code folder.
But that gives me a 404.
I've also tried adding ~/ride/ to umbracoReservedUrls umbracoReservedPaths in the web.config
Does anyone know how to get this to work?
Hi,
you could use the standard urlrewriting that is part of umbraco
Open urlrewriting from the config-folder and edit that file.
HTH,
Peter
How would I serve up that content then if I did do the URL rewriting?
With URL routing, I was going to have one macro on the ride page that would get the RideGUID like this:
Guid rideGuid = new Guid(Page.RouteData.Values["category"] as string);
If I did URL rewriting doesn't that make it so it expects a page at http://www.mysite.com/ride/BB067C2C-2627-4383-9B16-694BA62B7CF5?
Bump. Anyone have any ideas?
Hi Nate,
I am also a web form developer and used 4.0 webfrom routing feature. I recently started a project on umbraco so just wondering, is there possibilities to implementing webform routing as you raised question?
Please reply me.
Thanks,
Parwej
I did it through URL Rewrite that's provided by umbraco in the UrlRewriting.config file
<add name="CyclingRides"
virtualUrl="^~/cycling/rides/(?<RIDE_ID>[0-9]+)$"
destinationUrl="~/cycling/rides?id=${RIDE_ID}"
ignoreCase="true" rewrite="Application" />
That changes /cycling/rides?1234 to /cycling/rides/1234. I also have acecss to ID through request.querystring on my page. Works great!
Thanks Nate, I will follow your suggestion and it looks great.
Someone has posted an article to work around the asp.net routing features, I didn't got a chance look into more. Soon I will you updated here if works for me.
http://wishfulcode.com/2010/09/19/asp-net-routing-and-virtual-article-based-extensionless-website-urls/
Thanks,
Parwej
Hi,
I know it is an old topic, but i cant seem to find UrlRewriting.config file in my porject, i am using Umbraco 5.0.1 CMS Web Application
from codeplex site,
Thanks in Advance,
Sher
is working on a reply...