c# - Subdomain rewrite to static file directory in ASP.NET -


i trying achieve following in mvc5 app.

  1. in mvc site root, subdirectory "sites" static files live. instance, there might static assets (html, js, css) "acme" , located under "/sites/acme/"

  2. ideally, if hit "acme.localhost" (in dev environment) serve contents of /sites/acme location, defaulting index.html. on subdomain of acme rewritten relative /sites/acme. have dns side of sorted out.

  3. i know iis url rewrite module designed scenario, catch users can define subdomain in mvc app dynamically (these stored in database). don't know be, , far understand editing rewriting in web.config if way cause parent mvc application pool recycle. makes me think has sort of httphandler looks @ cached table of possible subdomains registered in system , rewrites accordingly.

any thoughts or suggestions? thinking http module or custom route handler not sure how achieve this, , wary of doing in efficient way.

thanks


Comments

Popular posts from this blog

hibernate - How to load global settings frequently used in application in Java -

python 3.x - Mapping specific letters onto a list of words -

objective c - Ownership modifiers with manual reference counting -