c# - Subdomain rewrite to static file directory in ASP.NET -
i trying achieve following in mvc5 app.
in mvc site root, subdirectory "sites" static files live. instance, there might static assets (html, js, css) "acme" , located under "/sites/acme/"
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.
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
Post a Comment