Friday, February 4, 2011

ASP.NET MVC Route Help, 2 routes, 1 with a category url structure and the other for content page

Hi,

I need some help with ASP.NET MVC routes. I need to create 2 routes for a cms type application. One route will be for category level URLS, and the other route will be for the actual page content.

  • categories, always ends in a '/'

www.example.com/category/

www.example.com/category/subcategory/

www.example.com/category/subcategory/subsubcategory/

  • content page, doesn't end in a '/', can only be at the root level or after 1 subcategory page.

www.example.com/root-level-page

www.example.com/category/some-page-name

Ideas?

  • What's the question?

  • Routing does not distinguish between URLs ending with a / and URLs that don't end in /.

    From Haacked

0 comments:

Post a Comment