Multi tenany and UrlPrefix does not work

Topics: Administration, Core, Customizing Orchard, General, Writing modules, Writing themes
Apr 19, 2014 at 3:17 PM
It seems Multi tenancy does not work with URL prefix. I tried it but the Prefix didn't use in any urls such as Style.Include, Script.Include, ... that i used in Theme. Therefore all urls point to Theme files in default tenant.
Coordinator
Apr 19, 2014 at 7:30 PM
Well, whatever the tenant prefix is, the theme's files will always be accessible using the root url. This is expected and works. Can you explain what the issue is with it ?
Apr 19, 2014 at 8:37 PM
OK, You are right. I expected different behavior from UrlPrefix. I had several problem with UrlPrefix.
For example my theme has customization per tenant. I serve customized stylesheet on a route that must be different per tenant.
Also UrlPrefix causes problem in Layer Rule and url alternation. (ex. Layout-url-contactus.cshtml cannot be used for "http://site.com/prefix/contactus")
I expected root for a tenant is "~/prefix" not "~/". I was wrong.

Therefore i cannot use this feature unless i use baseUrl manually anywhere. Correct?
var baseUrl = Url.Content("~/") + WorkContext.Resolve<ShellSettings>().RequestUrlPrefix;