views:

452

answers:

2

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?

A: 

What's the question?

Daniel Jennings
+1  A: 

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

Haacked