Magento 2 Multi Store with Sub-domain for B2BCreate Multi Website/Stores in magento 2Multi store shop on same domain in combination with sslmulti-store with an sub-directory nginx php-fpmMagento Multi-Store with Domain Alias - 404 Error on 2nd StoreMagento 1.8 Multi-Store in folder - 404 errorMulti-Store with multi-domain and sub-directory Setup - SymlinksMultistore - Magento 2 SetupIs a shared cart possible in a multi-store with multi-domain [v1.9]?Magento2 multi-store on different domainBuilding multi stores with multi domains but get 500magento 2 multiple store views with sub domain url

Where is Jon going?

Is the Unsullied name meant to be ironic? How did it come to be?

Did this character show any indication of wanting to rule before S8E6?

Which European Languages are not Indo-European?

Why did the person in charge of a principality not just declare themself king?

Of strange atmospheres - the survivable but unbreathable

Why isn't Tyrion mentioned in the in-universe book "A Song of Ice and Fire"?

便利な工具 what does な means

Nuke it from orbit - surely can only mean bin and buy replacement?

Is my plasma cannon concept viable?

Is it truly impossible to tell what a CPU is doing?

includegraphics: get the "scale" value of a figure whose size is expressed by "width"

What's difference between "depends on" and "is blocked by" relations between issues in Jira next-gen board?

Beginner looking to learn/master musical theory and instrumental ability. Where should I begin?

Gravitational effects of a single human body on the motion of planets

Best material to absorb as much light as possible

Why would a rational buyer offer to buy with no conditions precedent?

Why do Russians almost not use verbs of possession akin to "have"?

What does kpsewhich stand for?

What did the 'turbo' button actually do?

Does French have the English "short i" vowel?

Can a wizard copy a spell without first identifying it?

What Armor Optimization applies to a Mithral full plate?

Security vulnerabilities of POST over SSL



Magento 2 Multi Store with Sub-domain for B2B


Create Multi Website/Stores in magento 2Multi store shop on same domain in combination with sslmulti-store with an sub-directory nginx php-fpmMagento Multi-Store with Domain Alias - 404 Error on 2nd StoreMagento 1.8 Multi-Store in folder - 404 errorMulti-Store with multi-domain and sub-directory Setup - SymlinksMultistore - Magento 2 SetupIs a shared cart possible in a multi-store with multi-domain [v1.9]?Magento2 multi-store on different domainBuilding multi stores with multi domains but get 500magento 2 multiple store views with sub domain url






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








1















I need to create a new store for my e-commerce (not a new website, not a new store front) for B2B.



Now, my e-commerce is active on mobiroloshop.com (B2C) and I want the new store on b2b.mobiroloshop.com.



I've followed several tutorials but still have problems. If I create an alias (parked domain) on cPanel for B2B, when I type b2b.mobiroloshop.com,



I'm redirected to mobiroloshop.com. I tried both to change .htaccess file (following step-by-step this tutorial https://www.cloudways.com/blog/create-and-configure-multistore-magento-2/) and to use a switch statement on my index.php (to switch B2B or B2C based on $_SERVER content).



Can someone please help me with this struggling issue?



This is my Magento Stores configuration



My Magento store configuration.










share|improve this question
























  • mageplaza.com/kb/how-to-setup-multiple-stores-magento-2.html

    – Ankit Shah
    Mar 17 '17 at 7:54











  • I tried this too, but without setting subdomain the browser responds with "Server not found" @AnkitShah

    – Giuseppe Capoluongo
    Mar 17 '17 at 7:57












  • magento.stackexchange.com/questions/94855/… magecomp.com/blog/setup-multi-store-in-magento-2 devdocs.magento.com/guides/v2.0/config-guide/multi-site/…

    – Ankit Shah
    Mar 17 '17 at 7:59











  • Tried everything in there, I still have this "redirect" issue. If I type b2b.mobiroloshop.com it goes to mobiroloshop.com (b2c store) @AnkitShah

    – Giuseppe Capoluongo
    Mar 17 '17 at 8:32


















1















I need to create a new store for my e-commerce (not a new website, not a new store front) for B2B.



Now, my e-commerce is active on mobiroloshop.com (B2C) and I want the new store on b2b.mobiroloshop.com.



I've followed several tutorials but still have problems. If I create an alias (parked domain) on cPanel for B2B, when I type b2b.mobiroloshop.com,



I'm redirected to mobiroloshop.com. I tried both to change .htaccess file (following step-by-step this tutorial https://www.cloudways.com/blog/create-and-configure-multistore-magento-2/) and to use a switch statement on my index.php (to switch B2B or B2C based on $_SERVER content).



Can someone please help me with this struggling issue?



This is my Magento Stores configuration



My Magento store configuration.










share|improve this question
























  • mageplaza.com/kb/how-to-setup-multiple-stores-magento-2.html

    – Ankit Shah
    Mar 17 '17 at 7:54











  • I tried this too, but without setting subdomain the browser responds with "Server not found" @AnkitShah

    – Giuseppe Capoluongo
    Mar 17 '17 at 7:57












  • magento.stackexchange.com/questions/94855/… magecomp.com/blog/setup-multi-store-in-magento-2 devdocs.magento.com/guides/v2.0/config-guide/multi-site/…

    – Ankit Shah
    Mar 17 '17 at 7:59











  • Tried everything in there, I still have this "redirect" issue. If I type b2b.mobiroloshop.com it goes to mobiroloshop.com (b2c store) @AnkitShah

    – Giuseppe Capoluongo
    Mar 17 '17 at 8:32














1












1








1


1






I need to create a new store for my e-commerce (not a new website, not a new store front) for B2B.



Now, my e-commerce is active on mobiroloshop.com (B2C) and I want the new store on b2b.mobiroloshop.com.



I've followed several tutorials but still have problems. If I create an alias (parked domain) on cPanel for B2B, when I type b2b.mobiroloshop.com,



I'm redirected to mobiroloshop.com. I tried both to change .htaccess file (following step-by-step this tutorial https://www.cloudways.com/blog/create-and-configure-multistore-magento-2/) and to use a switch statement on my index.php (to switch B2B or B2C based on $_SERVER content).



Can someone please help me with this struggling issue?



This is my Magento Stores configuration



My Magento store configuration.










share|improve this question
















I need to create a new store for my e-commerce (not a new website, not a new store front) for B2B.



Now, my e-commerce is active on mobiroloshop.com (B2C) and I want the new store on b2b.mobiroloshop.com.



I've followed several tutorials but still have problems. If I create an alias (parked domain) on cPanel for B2B, when I type b2b.mobiroloshop.com,



I'm redirected to mobiroloshop.com. I tried both to change .htaccess file (following step-by-step this tutorial https://www.cloudways.com/blog/create-and-configure-multistore-magento-2/) and to use a switch statement on my index.php (to switch B2B or B2C based on $_SERVER content).



Can someone please help me with this struggling issue?



This is my Magento Stores configuration



My Magento store configuration.







magento2 multistore b2b






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 30 '17 at 21:12









Rama Chandran M

2,78481530




2,78481530










asked Mar 17 '17 at 7:53









Giuseppe CapoluongoGiuseppe Capoluongo

216




216












  • mageplaza.com/kb/how-to-setup-multiple-stores-magento-2.html

    – Ankit Shah
    Mar 17 '17 at 7:54











  • I tried this too, but without setting subdomain the browser responds with "Server not found" @AnkitShah

    – Giuseppe Capoluongo
    Mar 17 '17 at 7:57












  • magento.stackexchange.com/questions/94855/… magecomp.com/blog/setup-multi-store-in-magento-2 devdocs.magento.com/guides/v2.0/config-guide/multi-site/…

    – Ankit Shah
    Mar 17 '17 at 7:59











  • Tried everything in there, I still have this "redirect" issue. If I type b2b.mobiroloshop.com it goes to mobiroloshop.com (b2c store) @AnkitShah

    – Giuseppe Capoluongo
    Mar 17 '17 at 8:32


















  • mageplaza.com/kb/how-to-setup-multiple-stores-magento-2.html

    – Ankit Shah
    Mar 17 '17 at 7:54











  • I tried this too, but without setting subdomain the browser responds with "Server not found" @AnkitShah

    – Giuseppe Capoluongo
    Mar 17 '17 at 7:57












  • magento.stackexchange.com/questions/94855/… magecomp.com/blog/setup-multi-store-in-magento-2 devdocs.magento.com/guides/v2.0/config-guide/multi-site/…

    – Ankit Shah
    Mar 17 '17 at 7:59











  • Tried everything in there, I still have this "redirect" issue. If I type b2b.mobiroloshop.com it goes to mobiroloshop.com (b2c store) @AnkitShah

    – Giuseppe Capoluongo
    Mar 17 '17 at 8:32

















mageplaza.com/kb/how-to-setup-multiple-stores-magento-2.html

– Ankit Shah
Mar 17 '17 at 7:54





mageplaza.com/kb/how-to-setup-multiple-stores-magento-2.html

– Ankit Shah
Mar 17 '17 at 7:54













I tried this too, but without setting subdomain the browser responds with "Server not found" @AnkitShah

– Giuseppe Capoluongo
Mar 17 '17 at 7:57






I tried this too, but without setting subdomain the browser responds with "Server not found" @AnkitShah

– Giuseppe Capoluongo
Mar 17 '17 at 7:57














magento.stackexchange.com/questions/94855/… magecomp.com/blog/setup-multi-store-in-magento-2 devdocs.magento.com/guides/v2.0/config-guide/multi-site/…

– Ankit Shah
Mar 17 '17 at 7:59





magento.stackexchange.com/questions/94855/… magecomp.com/blog/setup-multi-store-in-magento-2 devdocs.magento.com/guides/v2.0/config-guide/multi-site/…

– Ankit Shah
Mar 17 '17 at 7:59













Tried everything in there, I still have this "redirect" issue. If I type b2b.mobiroloshop.com it goes to mobiroloshop.com (b2c store) @AnkitShah

– Giuseppe Capoluongo
Mar 17 '17 at 8:32






Tried everything in there, I still have this "redirect" issue. If I type b2b.mobiroloshop.com it goes to mobiroloshop.com (b2c store) @AnkitShah

– Giuseppe Capoluongo
Mar 17 '17 at 8:32











3 Answers
3






active

oldest

votes


















0














I had the same problem. What's missing is the environment variable.



Add to your .htaccess file



SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_CODE=b2b
SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_TYPE=store


If your server is Nginx, check:
http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_nginx.html



Regards






share|improve this answer
































    0














    I solved this problem setting the correct envioroment variables and using de env_mode of apache.



    <VirtualHost *:80>
    ServerName msite1.domain.com
    DocumentRoot /var/www/magedemo/pub

    <Directory /var/www/magedemo/pub/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    </Directory>
    </VirtualHost>

    <VirtualHost *:80>
    ServerName msite2.domain.com

    DocumentRoot /var/www/magedemo/pub

    <Directory /var/www/magedemo/pub/>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    </Directory>

    SetEnv MAGE_RUN_CODE "s2"
    SetEnv MAGE_RUN_TYPE "store"
    </VirtualHost>


    The code "s2" is the code configured for the webview.



    This is my configuration using Magento 2.1.7:



    enter image description here






    share|improve this answer






























      0














      This is possible through your index.php



      for apache use index.php and for nginx use pub/index.php



      example switch including development suffix support:



      if(!isset($_SERVER['MAGE_RUN_CODE']) || !$_SERVER['MAGE_RUN_CODE']) 
      if (preg_match('/^(.+).(developmentsuffix.com)/', $_SERVER['HTTP_HOST'], $match))
      $website = $match[1];
      else
      $website = $_SERVER['HTTP_HOST'];


      switch ($website)
      case "example.com":
      case "www.example.com":
      $_SERVER['MAGE_RUN_CODE'] = "website_code";
      $_SERVER['MAGE_RUN_TYPE'] = "website";
      break;

      case "sub.example.com":
      $_SERVER['MAGE_RUN_CODE'] = "website_code2";
      $_SERVER['MAGE_RUN_TYPE'] = "website";
      break;

      default:
      $_SERVER['MAGE_RUN_CODE'] = "website_code";
      $_SERVER['MAGE_RUN_TYPE'] = "website";




      put the code just above this line:




      $params = $_SERVER;




      and don't forget to set the correct base urls in the Magento Configuration






      share|improve this answer























        Your Answer








        StackExchange.ready(function()
        var channelOptions =
        tags: "".split(" "),
        id: "479"
        ;
        initTagRenderer("".split(" "), "".split(" "), channelOptions);

        StackExchange.using("externalEditor", function()
        // Have to fire editor after snippets, if snippets enabled
        if (StackExchange.settings.snippets.snippetsEnabled)
        StackExchange.using("snippets", function()
        createEditor();
        );

        else
        createEditor();

        );

        function createEditor()
        StackExchange.prepareEditor(
        heartbeatType: 'answer',
        autoActivateHeartbeat: false,
        convertImagesToLinks: false,
        noModals: true,
        showLowRepImageUploadWarning: true,
        reputationToPostImages: null,
        bindNavPrevention: true,
        postfix: "",
        imageUploader:
        brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
        contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
        allowUrls: true
        ,
        onDemand: true,
        discardSelector: ".discard-answer"
        ,immediatelyShowMarkdownHelp:true
        );



        );













        draft saved

        draft discarded


















        StackExchange.ready(
        function ()
        StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f164832%2fmagento-2-multi-store-with-sub-domain-for-b2b%23new-answer', 'question_page');

        );

        Post as a guest















        Required, but never shown

























        3 Answers
        3






        active

        oldest

        votes








        3 Answers
        3






        active

        oldest

        votes









        active

        oldest

        votes






        active

        oldest

        votes









        0














        I had the same problem. What's missing is the environment variable.



        Add to your .htaccess file



        SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_CODE=b2b
        SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_TYPE=store


        If your server is Nginx, check:
        http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_nginx.html



        Regards






        share|improve this answer





























          0














          I had the same problem. What's missing is the environment variable.



          Add to your .htaccess file



          SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_CODE=b2b
          SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_TYPE=store


          If your server is Nginx, check:
          http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_nginx.html



          Regards






          share|improve this answer



























            0












            0








            0







            I had the same problem. What's missing is the environment variable.



            Add to your .htaccess file



            SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_CODE=b2b
            SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_TYPE=store


            If your server is Nginx, check:
            http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_nginx.html



            Regards






            share|improve this answer















            I had the same problem. What's missing is the environment variable.



            Add to your .htaccess file



            SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_CODE=b2b
            SetEnvIf Host b2b.mobiroloshop.com MAGE_RUN_TYPE=store


            If your server is Nginx, check:
            http://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_nginx.html



            Regards







            share|improve this answer














            share|improve this answer



            share|improve this answer








            edited Jul 3 '17 at 8:07









            MagenX

            2,1421025




            2,1421025










            answered Jun 30 '17 at 20:02









            Carlos DeviaCarlos Devia

            1




            1























                0














                I solved this problem setting the correct envioroment variables and using de env_mode of apache.



                <VirtualHost *:80>
                ServerName msite1.domain.com
                DocumentRoot /var/www/magedemo/pub

                <Directory /var/www/magedemo/pub/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                </Directory>
                </VirtualHost>

                <VirtualHost *:80>
                ServerName msite2.domain.com

                DocumentRoot /var/www/magedemo/pub

                <Directory /var/www/magedemo/pub/>
                Options Indexes FollowSymLinks MultiViews
                AllowOverride All
                </Directory>

                SetEnv MAGE_RUN_CODE "s2"
                SetEnv MAGE_RUN_TYPE "store"
                </VirtualHost>


                The code "s2" is the code configured for the webview.



                This is my configuration using Magento 2.1.7:



                enter image description here






                share|improve this answer



























                  0














                  I solved this problem setting the correct envioroment variables and using de env_mode of apache.



                  <VirtualHost *:80>
                  ServerName msite1.domain.com
                  DocumentRoot /var/www/magedemo/pub

                  <Directory /var/www/magedemo/pub/>
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride All
                  </Directory>
                  </VirtualHost>

                  <VirtualHost *:80>
                  ServerName msite2.domain.com

                  DocumentRoot /var/www/magedemo/pub

                  <Directory /var/www/magedemo/pub/>
                  Options Indexes FollowSymLinks MultiViews
                  AllowOverride All
                  </Directory>

                  SetEnv MAGE_RUN_CODE "s2"
                  SetEnv MAGE_RUN_TYPE "store"
                  </VirtualHost>


                  The code "s2" is the code configured for the webview.



                  This is my configuration using Magento 2.1.7:



                  enter image description here






                  share|improve this answer

























                    0












                    0








                    0







                    I solved this problem setting the correct envioroment variables and using de env_mode of apache.



                    <VirtualHost *:80>
                    ServerName msite1.domain.com
                    DocumentRoot /var/www/magedemo/pub

                    <Directory /var/www/magedemo/pub/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    </Directory>
                    </VirtualHost>

                    <VirtualHost *:80>
                    ServerName msite2.domain.com

                    DocumentRoot /var/www/magedemo/pub

                    <Directory /var/www/magedemo/pub/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    </Directory>

                    SetEnv MAGE_RUN_CODE "s2"
                    SetEnv MAGE_RUN_TYPE "store"
                    </VirtualHost>


                    The code "s2" is the code configured for the webview.



                    This is my configuration using Magento 2.1.7:



                    enter image description here






                    share|improve this answer













                    I solved this problem setting the correct envioroment variables and using de env_mode of apache.



                    <VirtualHost *:80>
                    ServerName msite1.domain.com
                    DocumentRoot /var/www/magedemo/pub

                    <Directory /var/www/magedemo/pub/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    </Directory>
                    </VirtualHost>

                    <VirtualHost *:80>
                    ServerName msite2.domain.com

                    DocumentRoot /var/www/magedemo/pub

                    <Directory /var/www/magedemo/pub/>
                    Options Indexes FollowSymLinks MultiViews
                    AllowOverride All
                    </Directory>

                    SetEnv MAGE_RUN_CODE "s2"
                    SetEnv MAGE_RUN_TYPE "store"
                    </VirtualHost>


                    The code "s2" is the code configured for the webview.



                    This is my configuration using Magento 2.1.7:



                    enter image description here







                    share|improve this answer












                    share|improve this answer



                    share|improve this answer










                    answered Jul 19 '17 at 22:09









                    Christian LopezChristian Lopez

                    112




                    112





















                        0














                        This is possible through your index.php



                        for apache use index.php and for nginx use pub/index.php



                        example switch including development suffix support:



                        if(!isset($_SERVER['MAGE_RUN_CODE']) || !$_SERVER['MAGE_RUN_CODE']) 
                        if (preg_match('/^(.+).(developmentsuffix.com)/', $_SERVER['HTTP_HOST'], $match))
                        $website = $match[1];
                        else
                        $website = $_SERVER['HTTP_HOST'];


                        switch ($website)
                        case "example.com":
                        case "www.example.com":
                        $_SERVER['MAGE_RUN_CODE'] = "website_code";
                        $_SERVER['MAGE_RUN_TYPE'] = "website";
                        break;

                        case "sub.example.com":
                        $_SERVER['MAGE_RUN_CODE'] = "website_code2";
                        $_SERVER['MAGE_RUN_TYPE'] = "website";
                        break;

                        default:
                        $_SERVER['MAGE_RUN_CODE'] = "website_code";
                        $_SERVER['MAGE_RUN_TYPE'] = "website";




                        put the code just above this line:




                        $params = $_SERVER;




                        and don't forget to set the correct base urls in the Magento Configuration






                        share|improve this answer



























                          0














                          This is possible through your index.php



                          for apache use index.php and for nginx use pub/index.php



                          example switch including development suffix support:



                          if(!isset($_SERVER['MAGE_RUN_CODE']) || !$_SERVER['MAGE_RUN_CODE']) 
                          if (preg_match('/^(.+).(developmentsuffix.com)/', $_SERVER['HTTP_HOST'], $match))
                          $website = $match[1];
                          else
                          $website = $_SERVER['HTTP_HOST'];


                          switch ($website)
                          case "example.com":
                          case "www.example.com":
                          $_SERVER['MAGE_RUN_CODE'] = "website_code";
                          $_SERVER['MAGE_RUN_TYPE'] = "website";
                          break;

                          case "sub.example.com":
                          $_SERVER['MAGE_RUN_CODE'] = "website_code2";
                          $_SERVER['MAGE_RUN_TYPE'] = "website";
                          break;

                          default:
                          $_SERVER['MAGE_RUN_CODE'] = "website_code";
                          $_SERVER['MAGE_RUN_TYPE'] = "website";




                          put the code just above this line:




                          $params = $_SERVER;




                          and don't forget to set the correct base urls in the Magento Configuration






                          share|improve this answer

























                            0












                            0








                            0







                            This is possible through your index.php



                            for apache use index.php and for nginx use pub/index.php



                            example switch including development suffix support:



                            if(!isset($_SERVER['MAGE_RUN_CODE']) || !$_SERVER['MAGE_RUN_CODE']) 
                            if (preg_match('/^(.+).(developmentsuffix.com)/', $_SERVER['HTTP_HOST'], $match))
                            $website = $match[1];
                            else
                            $website = $_SERVER['HTTP_HOST'];


                            switch ($website)
                            case "example.com":
                            case "www.example.com":
                            $_SERVER['MAGE_RUN_CODE'] = "website_code";
                            $_SERVER['MAGE_RUN_TYPE'] = "website";
                            break;

                            case "sub.example.com":
                            $_SERVER['MAGE_RUN_CODE'] = "website_code2";
                            $_SERVER['MAGE_RUN_TYPE'] = "website";
                            break;

                            default:
                            $_SERVER['MAGE_RUN_CODE'] = "website_code";
                            $_SERVER['MAGE_RUN_TYPE'] = "website";




                            put the code just above this line:




                            $params = $_SERVER;




                            and don't forget to set the correct base urls in the Magento Configuration






                            share|improve this answer













                            This is possible through your index.php



                            for apache use index.php and for nginx use pub/index.php



                            example switch including development suffix support:



                            if(!isset($_SERVER['MAGE_RUN_CODE']) || !$_SERVER['MAGE_RUN_CODE']) 
                            if (preg_match('/^(.+).(developmentsuffix.com)/', $_SERVER['HTTP_HOST'], $match))
                            $website = $match[1];
                            else
                            $website = $_SERVER['HTTP_HOST'];


                            switch ($website)
                            case "example.com":
                            case "www.example.com":
                            $_SERVER['MAGE_RUN_CODE'] = "website_code";
                            $_SERVER['MAGE_RUN_TYPE'] = "website";
                            break;

                            case "sub.example.com":
                            $_SERVER['MAGE_RUN_CODE'] = "website_code2";
                            $_SERVER['MAGE_RUN_TYPE'] = "website";
                            break;

                            default:
                            $_SERVER['MAGE_RUN_CODE'] = "website_code";
                            $_SERVER['MAGE_RUN_TYPE'] = "website";




                            put the code just above this line:




                            $params = $_SERVER;




                            and don't forget to set the correct base urls in the Magento Configuration







                            share|improve this answer












                            share|improve this answer



                            share|improve this answer










                            answered Dec 3 '18 at 12:17









                            Mr. LewisMr. Lewis

                            1,320711




                            1,320711



























                                draft saved

                                draft discarded
















































                                Thanks for contributing an answer to Magento Stack Exchange!


                                • Please be sure to answer the question. Provide details and share your research!

                                But avoid


                                • Asking for help, clarification, or responding to other answers.

                                • Making statements based on opinion; back them up with references or personal experience.

                                To learn more, see our tips on writing great answers.




                                draft saved


                                draft discarded














                                StackExchange.ready(
                                function ()
                                StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmagento.stackexchange.com%2fquestions%2f164832%2fmagento-2-multi-store-with-sub-domain-for-b2b%23new-answer', 'question_page');

                                );

                                Post as a guest















                                Required, but never shown





















































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown

































                                Required, but never shown














                                Required, but never shown












                                Required, but never shown







                                Required, but never shown







                                Popular posts from this blog

                                Get product attribute by attribute group code in magento 2get product attribute by product attribute group in magento 2Magento 2 Log Bundle Product Data in List Page?How to get all product attribute of a attribute group of Default attribute set?Magento 2.1 Create a filter in the product grid by new attributeMagento 2 : Get Product Attribute values By GroupMagento 2 How to get all existing values for one attributeMagento 2 get custom attribute of a single product inside a pluginMagento 2.3 How to get all the Multi Source Inventory (MSI) locations collection in custom module?Magento2: how to develop rest API to get new productsGet product attribute by attribute group code ( [attribute_group_code] ) in magento 2

                                Category:9 (number) SubcategoriesMedia in category "9 (number)"Navigation menuUpload mediaGND ID: 4485639-8Library of Congress authority ID: sh85091979ReasonatorScholiaStatistics

                                Magento 2.3: How do i solve this, Not registered handle, on custom form?How can i rewrite TierPrice Block in Magento2magento 2 captcha not rendering if I override layout xmlmain.CRITICAL: Plugin class doesn't existMagento 2 : Problem while adding custom button order view page?Magento 2.2.5: Overriding Admin Controller sales/orderMagento 2.2.5: Add, Update and Delete existing products Custom OptionsMagento 2.3 : File Upload issue in UI Component FormMagento2 Not registered handleHow to configured Form Builder Js in my custom magento 2.3.0 module?Magento 2.3. How to create image upload field in an admin form