These would be mini sandboxed websites which have their own HTML, CSS and JS and would be in no way connected to the Umbraco CMS. They will be uploaded directly via FTP.
I know that I can use umbracoReservedUrls and umbracoReservedPaths to allow access to certain paths but I want to avoid having to edit the web.config file every time I need to add a new folder.
Put the folders for static content under one top folder you reference in umbracoReservedPaths?
For instance:
/pub/demo/demo-name
/pub/project-name
I like to use the /Content folder since most "newer" ASP.NET stuff seem to favor it. (IE. nuget packages)
You could however try to mess around with the HTTP handler and HTTP module order under system.webServer in web.config. If you move the static file handler above Umbraco you should be able to prioritize static content above Umbraco logic. Haven't done this myself though, so no guarantee for it to work or not create a mess for Umbraco. :)
Best practice for static files outside of Umbraco
I'm currently in the processes of giving my portfolio site an update and i'm considering moving it over to Umbraco (currently all static HTML pages)
I'd like to know what are the best ways to create static content outside of Umbraco. For example.
I would have Umbraco content along the lines of:
etc...
But I would also need to allow urls such as
These would be mini sandboxed websites which have their own HTML, CSS and JS and would be in no way connected to the Umbraco CMS. They will be uploaded directly via FTP.
I know that I can use
umbracoReservedUrls
andumbracoReservedPaths
to allow access to certain paths but I want to avoid having to edit theweb.config
file every time I need to add a new folder.Any suggestions would be great.
Put the folders for static content under one top folder you reference in
umbracoReservedPaths
?For instance:
I like to use the /Content folder since most "newer" ASP.NET stuff seem to favor it. (IE. nuget packages)
You could however try to mess around with the HTTP handler and HTTP module order under system.webServer in web.config. If you move the static file handler above Umbraco you should be able to prioritize static content above Umbraco logic. Haven't done this myself though, so no guarantee for it to work or not create a mess for Umbraco. :)
Lars-Erik
Could you expand on what you mean by 'favor it' ?
If you use nuget to manage your dependencies on jquery, bootstrap etc. all of them put the static content in the /Content root folder.
I always use nuget, so not sure about other cases.
is working on a reply...