Magento – Nginx Setup for Multistore on the same url

multistorenginx

I wish to setup multistores on our nginx environment but using the admin 'Add Store Code to Urls' isn't an option as we have several other sites that run off different urls and having store codes appended to them isn't necessary and looks awful.

so we have our base url:

www.domain.com
www.domain.com/store2/
www.domain.com/store3/
www.domain.com/store4/

I get the impression I need to use 'map' in the domain.conf file. Has anyone got a code example to help me?

thanks.

EDIT

ok i've discovered that
www.domain.com/store2/ (the home page works its when you go to)
www.domain.com/store2/category/ (it 404's)

however if you go to

www.domain.com/store2/index.php/category this goes through successfully so in fact what i'm needing to work out is why the index.php redirect that works on www.domain.com aren't applying the sub folder stores.

any ideas?

Best Answer

If you only use 1 domain and use every store as a sub directory use should only need to enable the option: System->Configuration->Web->URL options->Add store code to url.

This way the urls are used with the store view code you entered when creating the store and you do not need to add extra mapping in nginx.

Related Topic