Alex from Jitbit
Alex from Jitbit

Reputation: 60642

MVC conditional routing

I have an ASP.NET MVC website and a subdirectory "/dir/" under it which is also configured as an ASP.NET application.

I want the http://website/dir/ URL to route to a parent controller if some condition is met, or simply ignore it and "pass over" to the subdir-application if not. How do I do this?

PS. I cannot use RouteExistingFiles = true because both apps have some aspx/ashx/html files that need to work.

Upvotes: 1

Views: 1700

Answers (1)

ntl
ntl

Reputation: 1299

You may use route constraints for this purpose.

Upvotes: 2

Related Questions