3

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?

1
  • there's a way to do this with the server (virtual server) configs in ngnix. Have you tried making different nginx servers for them?
    – user16030
    Commented Nov 5, 2014 at 19:17

1 Answer 1

3

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.

1
  • PLease read my post carefully: '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.' Commented Aug 20, 2013 at 8:16

Your Answer

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

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