Magento的多店铺网址重写 [英] Magento Multi Store URL rewrite

查看:151
本文介绍了Magento的多店铺网址重写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们正在努力Magento的网站,有几个不同的商店。我们正在改写,所以当你在一个特定的商店,商店的名字添加到URL网址。我们已经尝试了几个不同的事情。首先通过打开添加存储code到URL,在系统>配置>网络。这将导致的商店名称之一被添加到链接两次和基座商店名称被添加商店的其余部分。我们的第二个想法是补充:

We are working on a Magento site that has several different stores. We are working on rewriting the url so when you are in a specific store, the store name is added to the url. We have tried a couple of different things. First by turning on "Add Store Code to Urls" in System>Configuration>Web. This causes one of the store names to be added to the url twice and the rest of the stores the base store name is added. Our second idea was to add:

SetEnvIf Request_URI ^\/site_wow\/ MAGE_RUN_CODE=site_wow
SetEnvIf Request_URI ^\/site_ahepa\/ MAGE_RUN_CODE=site_ahepa
SetEnvIf Request_URI ^\/site_ita\/ MAGE_RUN_CODE=site_ita
SetEnvIf Request_URI ^\/site_deca\/ MAGE_RUN_CODE=site_deca

在该网站上的的public_html文件夹中的.htaccess文件。该方法适用于ahepa店的人,但没有。如果我改变其它商店MAGE_RUN_ code = site_ahepa,它增加了site_ahepa的URL。

to the .htaccess file in the public_html folder on the site. This works for the ahepa store but none of the others. If I change the other stores to MAGE_RUN_CODE=site_ahepa, it adds the site_ahepa to the url.

我发现了一个类似的问题在这里: Magento站点切换的.htaccess 但我没有任何运气解决了这个问题。如果有任何人谁可以给我在正确的方向,我将不胜AP preciate吧。

I found a similar question here: Magento site switching .htaccess but am not having any luck fixing the problem. If there is anyone who could send me in the right direction I would greatly appreciate it.

推荐答案

好吧,这里是我开始工作。我有.htaccess文件,因为它是以上。在系统>配置>网络,我有添加存储code到URL设置为YES和使用服务器网址重写设置为NO。 URL重写的ahepa商店不同的是,其他的商店,但所有的链接重定向到正确的商店和产品都出现了,他们都应该,所以我不会去招惹它了。

Ok, here is what I got to work. I have the .htaccess file as it is above. In System>Configuration>Web, I have Add Store Code to Urls set to YES and Use Web Server Rewrites set to NO. The url rewrite for the ahepa store is different that the other stores but all of the links redirect to the correct stores and the products are showing up where they are supposed to so I am not going to mess with it anymore.

这篇关于Magento的多店铺网址重写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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