让 Magento 响应同一商店的多个域
我想让我的 magento 安装响应两个不同的域,例如 a.mydomain.com
和 b.anotherdomain.com
我需要 magento 响应相同商店,显示相同的客户、相同的目录、相同的价格等。
当然,区别是当通过 a.mydomain.com
访问商店时,所有链接和 URL 都应使用该域作为基本 URL,而当通过 b.anotherdomain.com
访问商店时,所有链接和 URL 应使用 b.anotherdomain.com
作为基本 URL。
有什么办法可以做到吗?到目前为止我发现的所有文档都涉及在同一个 magento 实例上拥有不同的商店,而我在这里需要的是让同一个商店响应两个不同的 URL。
谢谢你!
I would like to have my magento install respond to two different domains, e.g.a.mydomain.com
andb.anotherdomain.com
I need magento to respond with the same store, showing the same customers, the same catalog, same prices, etc.
The difference, of course, is that when the store is accessed through a.mydomain.com
all the links and urls should use this domain as baseurl, and when it is accessed through b.anotherdomain.com
all links and urls should use b.anotherdomain.com
as baseurl.
Is there any way to do so? All the documentation I've found so far deal with having different stores on the same magento instance, while what I need here is to have the same store respond to two different URLs.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我对 Magento 的了解都表明,它的设计初衷就是为了防止这种情况发生,以免搜索引擎因重复内容而受到惩罚。
但是,您可以拥有多个共享客户、目录、产品和价格等的商店,但每个商店代表一个单独的域。在系统>中管理商店为单个网站添加多个商店,并为所有商店使用相同的根类别。然后在系统>中配置> Web 分配各个域。
Everything I know of Magento says it was designed to prevent exactly this from happening so as not to be penalised by search engines for duplicate content.
You can, however, have multiple stores that share customers and catalog and products and prices and so on, but represent a separate domain each. In System > Manage Stores add several Stores for a single website and use the same root category for them all. Then in System > Configuration > Web assign the various domains.
很简单,只需将它们设置为使用相同的存储代码(或只是默认),
看看index.php,
您可以将 $mageRunCode 设置为您想要的任何内容,您不必使用它们的服务器环境变量方法在那里,查看早期版本的 Magento 以查看那里的 index.php 文件。
看我们的这篇旧文章
http://www.edmondscommerce.co.uk/ magento/magento-multistore-setup-in-a-nutshell/
easy enough, just set them both to use the same store code (or just default)
have a look in index.php
you can set the $mageRunCode to be whatever you want, you don't have to use the server environment variables method they have there, look at earlier versions of Magento to see the index.php file there.
see this old article of ours
http://www.edmondscommerce.co.uk/magento/magento-multistore-setup-in-a-nutshell/