Quantcast
Channel: ASP.NET Core
Viewing all articles
Browse latest Browse all 9386

Can I change the wwwroot folder at runtime?

$
0
0

Lets say we have an application that returns different content for different domain names.

And we want to handle static files: css files, robots.txt etc.

We can have subfolders in wwwrot: site1 and site2

We want to return \wwwroot\site1\robots.txt when the request is http://site1.com/robots.txt

and \wwwroot\site2\robots.txt when the request is http://site2.com/robots.txt

How to do that?

I have similar functionality in my MVC5 project. I store those files in \App_Data\Sites\<siteid>\ and then use Url Rewriting module to map requests


Viewing all articles
Browse latest Browse all 9386

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>