如何使用 Orchard 多租户模块获得 www.site.com 和 site.com
我已在果园的一个面向公众的网站上成功建立了多租户。如果您输入 www.tenant.com,它在 Orchard 中运行良好。然而,Orchard 的租户管理员只允许输入一个站点的信息。在用户只需输入tenant.com的情况下,当我尝试在房东网站中绑定它时,它会将我带到房东页面,而不是租户页面。在果园租户管理中添加新的“租户”实际上会创建一个新站点(至少,我进入设置配方页面),而不是采用实际租户站点的替代方案。有什么想法吗?
I have successfully set up multi-tenancy in Orchard on a public facing site. If you enter www.tenant.com it works fine in Orchard. However, Orchard's admin for Tenants only allows input for one site. In the instance where a user just types tenant.com, when I tried binding that in landlord site it takes me to the landlord page, not the tenant. Adding a new "tenant" in Orchard Tenants admin will literally create a new site (at least, i get to the setup recipe page) and not take that alternative to the actual tenant site. Any thoughts?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
很抱歉碰到一个非常老的问题,但我很无聊,正在阅读一些 Orchard 源代码,我看到了这一点:
我实际上没有任何多租户站点来测试它,而且我懒得设置一个,但是,在我看来,你可以只做“www.test.com,test.com”。也许有人可以澄清这一点,但我认为对于遇到此问题的其他人来说,这将是最简单的解决方案。
一切顺利
Sorry to bump a really old question but I am bored and am reading through some Orchard source code and I see this:
I don't actually have any multi-tenant sites to test this on and am too lazy to set one up but well, looks to me like you can just do "www.test.com, test.com". Maybe someone can clarify this but I think this would be the simplest solution for anyone else encountering this problem.
All the best
这是个好问题。我要做的就是从其中一个域永久重定向到您希望成为规范的域。从搜索引擎优化的角度来看,这就是你应该做的。
That's a good question. What I would do is put a permanent redirect from one of the domains to the one you prefer to be canonical. From an SEO perspective, that's what you should do anyway.