2

I am using Magento 1.8.1.0 with multiple websites. I followed the instructions to setup the multiple websites as described here: http://www.dbits.be/blog/index.php/How-To/magento-multi-store-setup-sub-folders.html

  • Create stores/views/sites
  • Set default URL (safe/unsafe) and Homepage for each store.
  • Create subfolders, files & symlinks
  • Edit index.php in each subfolder

I would say that my setup is working halfway:

www.mydomain.com/ is pointing to my base website. This website is working perfectly fine.

www.mydomain.com/paris/ is pointing to the Paris website homepage which is fine. The links in the menu all have the www.mydomain.com/paris/ subfolder part, so this seems to be working fine too.

Problem is when I try to access a category or a product within a secondary website, such as www.mydomain.com/paris/shirts/

This type of URL is redirecting to the main website homepage. So it seems Magento doesn't recognize urls of type www.mydomain.com/paris/xxxx to belong to the Paris website but is looking in the base website, can't find anything and redirects to the base website's homepage.

I am out of ideas on how to fix this, any suggestion would be highly appreciated.

3
  • Go to System->Configuration->Web->Url Options and set the flag Auto-redirect to Base URL to No.
    – Marius
    Jun 8, 2015 at 14:42
  • I had hope when I saw your comment but Auto-redirect to Base URL is already set to No
    – fkoessler
    Jun 8, 2015 at 14:54
  • 2
    Don't lose hope. That was my first idea. Try this. In the subfolders copy also the .htaccess file (I hope you are running on apache) and uncomment the line #RewriteBase /magento/ and replace /magento/ with your folder name. /paris/ in this case.
    – Marius
    Jun 8, 2015 at 14:56

2 Answers 2

3

In the subfolders copy also the .htaccess file (I hope you are running on apache) and uncomment the line #RewriteBase /magento/ and replace /magento/ with your folder name. /paris/ in this case.

0

I think an alternative to this is to define the website/storeview in the .htaccess, like this:

SetEnvIf Request_URI "^paris/.*" MAGE_RUN_CODE={storecode}

I'm not sure about the regex, so maybe you need to try with a starting /

With this solution no subdirectory is needed.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.