OpenCart在不同域上的多商店设置? [英] OpenCart Mult-store setup over different domains?

查看:471
本文介绍了OpenCart在不同域上的多商店设置?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否可以通过不同的域名将Open Cart设置为多商店安装?

Is it possible to setup Open Cart as a multi-store installation over different domain names?

我在域www.xxx.xx上有一个OC设置.官方文档说明了如何在子域(即subdomain.xxx.xx)上设置OC.可以,我们可以做到.但是,我们需要让商店在完全不同的域上运行.这意味着,即安装在subdomain.xxx.xx上的多商店克隆可通过www.somedomain.xx访问.

I have a OC setup on domain www.xxx.xx. The official documentation explains how to setup OC on a subdomain (i.e. subdomain.xxx.xx). That is OK and we can do that. However we need ot have the stores running on completely different domains. That means i.e. the multi-store clone installed on subdomain.xxx.xx accessible through www.somedomain.xx.

现在,我知道可以将TLD somedomain.xx重定向到子域安装中.但是,这并不是我们真正需要的.我们需要它充当完全不同的商店.

Now I am aware that I could redirect the TLD somedomain.xx into the subdomain installation. However that is not really what we need. We need for it to act as completely different stores.

问题是我该怎么做?甚至有可能吗? (我可以想象在这样的环境中设置会话和cookie可能会有一些问题?除了其他可能的问题...)

Question is how do I do this? And is this even possible? (as I can imagine that there might be some problems with sessions and cookies set in such an environment? besides possible other issues...)

(我们拥有自己的服务器,可以访问root用户,因此我们的选择不受托管帐户的限制)

(we have our own servers with access to root so our options are not limited with hosting accounts)

推荐答案

如果您确实需要多域多商店,则可以先设置子域多商店,然后再设置子域多商店来实现.域作为该子域的别名,例如

If You really need to have the multi-domain multi-store, You can achieve it by setting up the sub-domain multi-store first and then making the domains to be aliases to this sub-domains, e.g.

  • Default Store -> http://www.domain.com
  • Store 1 -> http://sub1.domain.com
  • Store 2 -> http://sub2.domain.com
  • Store 3 -> http://sub3.domain.com

然后

  • http://www.domain1.com -> http://sub1.domain.com
  • http://www.domain2.com -> http://sub2.domain.com
  • http://www.domain3.com -> http://sub3.domain.com

尽管现在 http://sub1.domain.com http://www.domain1.com 营销只能由 http://www.domain1.com URL.也许可以设置其他一些.htaccess限制/从直接访问 http://sub1.domain.com 的重定向但这根本没有必要.使用这些别名到子域,您应该能够保留子域上的多重存储的所有功能...

Though the Store 1 could be accessed now by both http://sub1.domain.com and http://www.domain1.com it is up to marketing to deliver only http://www.domain1.com URL. Perhaps some other .htaccess restrictions/redirect from direct access to http://sub1.domain.com may be set but this is not necessary at all. Using these aliases to sub-domains You should be able to preserve all the functionality of multi-store on sub-domains...

这篇关于OpenCart在不同域上的多商店设置?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆