I have a really interesting case:
I have a site where this is already working
But I’d also like these urls to work as well
- http://mysite.com/farm
- http://mysite.com/farm/browse/mens
- http://mysite.com/farm/product/1/cooltshirt
the farm part is fake, it doesn’t do anything except to exist for SEO, there is no corresponding controller or action associated with it
Essentially, I have a ton of routes already, but I’d also like the site to behave exactly the same if “farm” is appended after the “mysite” the hostname. So it’s kind of like a subdirectory behaving exactly like going on the main site.
You can add a route with constraint. Make sure it’s above the default route.
It just makes sure URLs starting with “farm” gets their controller name from 2nd segment and action name from the 3rd segment.