0
votes

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

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.

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.

1

1 Answers

1
votes

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.