Magento 2.3.0 - Multi Website Store URL Return 404 errorCreate Multi Website/Stores in magento 2Magento 2: Remove Store Code in URL only for default storeMagento 2: Multiple websites and stores on apache or nginx serverMagento2 | Multi Domain & Multi WebsiteAll pages return 404 errorMagento 2 Wamp installation CSS/JS files return 404 error - multi storeMulti website multi currency setupMagento 2.1.3 Multi Website or Multi StoreMagento 2 Multi websiteMagento2 | Multi Domain & Multi WebsiteMagento 2 Multi Store Show 404 - Virtual Host with XAMPP404 / 500 after installing Magento 2.3Magento 2.3.0 - Set up multiple websites, stores, and store viewsmagento 2 multi-website This site can’t be reached

How does quantile regression compare to logistic regression with the variable split at the quantile?

How to format long polynomial?

infared filters v nd

What's the output of a record needle playing an out-of-speed record

Is it possible to run Internet Explorer on OS X El Capitan?

Why does Kotter return in Welcome Back Kotter?

Accidentally leaked the solution to an assignment, what to do now? (I'm the prof)

Was any UN Security Council vote triple-vetoed?

Why can't we play rap on piano?

High voltage LED indicator 40-1000 VDC without additional power supply

Is it legal for company to use my work email to pretend I still work there?

What is a clear way to write a bar that has an extra beat?

What is the word for reserving something for yourself before others do?

Are astronomers waiting to see something in an image from a gravitational lens that they've already seen in an adjacent image?

How old can references or sources in a thesis be?

Horror movie about a virus at the prom; beginning and end are stylized as a cartoon

Why are electrically insulating heatsinks so rare? Is it just cost?

Did Shadowfax go to Valinor?

Theorems that impeded progress

How can bays and straits be determined in a procedurally generated map?

How does one intimidate enemies without having the capacity for violence?

I'm flying to France today and my passport expires in less than 2 months

If human space travel is limited by the G force vulnerability, is there a way to counter G forces?

Could an aircraft fly or hover using only jets of compressed air?



Magento 2.3.0 - Multi Website Store URL Return 404 error


Create Multi Website/Stores in magento 2Magento 2: Remove Store Code in URL only for default storeMagento 2: Multiple websites and stores on apache or nginx serverMagento2 | Multi Domain & Multi WebsiteAll pages return 404 errorMagento 2 Wamp installation CSS/JS files return 404 error - multi storeMulti website multi currency setupMagento 2.1.3 Multi Website or Multi StoreMagento 2 Multi websiteMagento2 | Multi Domain & Multi WebsiteMagento 2 Multi Store Show 404 - Virtual Host with XAMPP404 / 500 after installing Magento 2.3Magento 2.3.0 - Set up multiple websites, stores, and store viewsmagento 2 multi-website This site can’t be reached






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








4















Workout :



1) Created new folder in Root folder named usa,



2) Copy index.php and .htaccess from root folder and moved to usa folder



3) Created symbolic links to usa folder, usa symbolic links are,




C:wampwwwfirst_store>mklink /d ..first_storeusaapp.app

C:wampwwwfirst_store>mklink /d ..first_storeusapub.pub

C:wampwwwfirst_store>mklink /d ..first_storeusalib.lib

C:wampwwwfirst_store>mklink /d ..first_storeusavar.var




4)usa index.php,



Set values for the MAGE_RUN_TYPE and MAGE_RUN_CODE



Open the index.php file under application root directory



Replacing this code: $bootstrap = MagentoFrameworkAppBootstrap::create(BP, $_SERVER);

by these codes:

switch($_SERVER['HTTP_HOST'])
case 'http://127.0.0.1:8080/first_store':
$mageRunCode = 'base';
$mageRunType = 'website';
break;
case 'http://127.0.0.1:8080/usa':
$mageRunCode = 'usa_website';
$mageRunType = 'website';
break;

$params = $_SERVER;
$params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
$params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;
$bootstrap = MagentoFrameworkAppBootstrap::create(BP, $params);


5) usa .htaccess file,



## enable rewrites

Options +FollowSymLinks
RewriteEngine on

SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_CODE=usa_website
SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_TYPE=website


6) Store configuration,



enter image description here



7) after run 127.0.0.1:8080/usa return 404 error , how can i solve this issue?










share|improve this question






























    4















    Workout :



    1) Created new folder in Root folder named usa,



    2) Copy index.php and .htaccess from root folder and moved to usa folder



    3) Created symbolic links to usa folder, usa symbolic links are,




    C:wampwwwfirst_store>mklink /d ..first_storeusaapp.app

    C:wampwwwfirst_store>mklink /d ..first_storeusapub.pub

    C:wampwwwfirst_store>mklink /d ..first_storeusalib.lib

    C:wampwwwfirst_store>mklink /d ..first_storeusavar.var




    4)usa index.php,



    Set values for the MAGE_RUN_TYPE and MAGE_RUN_CODE



    Open the index.php file under application root directory



    Replacing this code: $bootstrap = MagentoFrameworkAppBootstrap::create(BP, $_SERVER);

    by these codes:

    switch($_SERVER['HTTP_HOST'])
    case 'http://127.0.0.1:8080/first_store':
    $mageRunCode = 'base';
    $mageRunType = 'website';
    break;
    case 'http://127.0.0.1:8080/usa':
    $mageRunCode = 'usa_website';
    $mageRunType = 'website';
    break;

    $params = $_SERVER;
    $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
    $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;
    $bootstrap = MagentoFrameworkAppBootstrap::create(BP, $params);


    5) usa .htaccess file,



    ## enable rewrites

    Options +FollowSymLinks
    RewriteEngine on

    SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_CODE=usa_website
    SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_TYPE=website


    6) Store configuration,



    enter image description here



    7) after run 127.0.0.1:8080/usa return 404 error , how can i solve this issue?










    share|improve this question


























      4












      4








      4


      2






      Workout :



      1) Created new folder in Root folder named usa,



      2) Copy index.php and .htaccess from root folder and moved to usa folder



      3) Created symbolic links to usa folder, usa symbolic links are,




      C:wampwwwfirst_store>mklink /d ..first_storeusaapp.app

      C:wampwwwfirst_store>mklink /d ..first_storeusapub.pub

      C:wampwwwfirst_store>mklink /d ..first_storeusalib.lib

      C:wampwwwfirst_store>mklink /d ..first_storeusavar.var




      4)usa index.php,



      Set values for the MAGE_RUN_TYPE and MAGE_RUN_CODE



      Open the index.php file under application root directory



      Replacing this code: $bootstrap = MagentoFrameworkAppBootstrap::create(BP, $_SERVER);

      by these codes:

      switch($_SERVER['HTTP_HOST'])
      case 'http://127.0.0.1:8080/first_store':
      $mageRunCode = 'base';
      $mageRunType = 'website';
      break;
      case 'http://127.0.0.1:8080/usa':
      $mageRunCode = 'usa_website';
      $mageRunType = 'website';
      break;

      $params = $_SERVER;
      $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
      $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;
      $bootstrap = MagentoFrameworkAppBootstrap::create(BP, $params);


      5) usa .htaccess file,



      ## enable rewrites

      Options +FollowSymLinks
      RewriteEngine on

      SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_CODE=usa_website
      SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_TYPE=website


      6) Store configuration,



      enter image description here



      7) after run 127.0.0.1:8080/usa return 404 error , how can i solve this issue?










      share|improve this question
















      Workout :



      1) Created new folder in Root folder named usa,



      2) Copy index.php and .htaccess from root folder and moved to usa folder



      3) Created symbolic links to usa folder, usa symbolic links are,




      C:wampwwwfirst_store>mklink /d ..first_storeusaapp.app

      C:wampwwwfirst_store>mklink /d ..first_storeusapub.pub

      C:wampwwwfirst_store>mklink /d ..first_storeusalib.lib

      C:wampwwwfirst_store>mklink /d ..first_storeusavar.var




      4)usa index.php,



      Set values for the MAGE_RUN_TYPE and MAGE_RUN_CODE



      Open the index.php file under application root directory



      Replacing this code: $bootstrap = MagentoFrameworkAppBootstrap::create(BP, $_SERVER);

      by these codes:

      switch($_SERVER['HTTP_HOST'])
      case 'http://127.0.0.1:8080/first_store':
      $mageRunCode = 'base';
      $mageRunType = 'website';
      break;
      case 'http://127.0.0.1:8080/usa':
      $mageRunCode = 'usa_website';
      $mageRunType = 'website';
      break;

      $params = $_SERVER;
      $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
      $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;
      $bootstrap = MagentoFrameworkAppBootstrap::create(BP, $params);


      5) usa .htaccess file,



      ## enable rewrites

      Options +FollowSymLinks
      RewriteEngine on

      SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_CODE=usa_website
      SetEnvIf Host .*http://127.0.0.1:8080/usa/.* MAGE_RUN_TYPE=website


      6) Store configuration,



      enter image description here



      7) after run 127.0.0.1:8080/usa return 404 error , how can i solve this issue?







      magento2.3 localhost multi-website wamp






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 4 at 11:43







      zus

















      asked Jan 4 at 5:03









      zuszus

      85119




      85119




















          2 Answers
          2






          active

          oldest

          votes


















          2














          1. Check that you have enabled To include the store code in URLs as explained in user guide here.


          2. Try to either the .htaccess or index.php override.
            So you can remove,
            $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
            $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;



            • References:


            • devdocs.magento.com/v2.3/config-guide/multi-site/ms_apache.html


            • devdocs.magento.com/guides/v2.3/config-guide/multi-site/ms_websites.html#multi-storecode-baseurl

            • docs.magento.com/m2/ce/user_guide/stores/store-urls.html






          share|improve this answer























          • After remove $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode; $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType; still getting same error @Milind Singh

            – zus
            Jan 4 at 7:57











          • @zus Have you included the store code in URLs from admin config ?

            – Milind Singh
            Jan 4 at 8:45











          • Also can you add first_store in apache conf

            – Milind Singh
            Jan 4 at 8:47











          • I just want to know how can i add both @Milind Singh

            – zus
            Jan 4 at 8:51












          • can you pls join with chat.stackexchange.com/rooms/87829/… @Milind Singh

            – zus
            Jan 4 at 9:09



















          0














          You need to set the Base URL for the store view in the admin. I had the same issue until I did that.






          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%2f256694%2fmagento-2-3-0-multi-website-store-url-return-404-error%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown

























            2 Answers
            2






            active

            oldest

            votes








            2 Answers
            2






            active

            oldest

            votes









            active

            oldest

            votes






            active

            oldest

            votes









            2














            1. Check that you have enabled To include the store code in URLs as explained in user guide here.


            2. Try to either the .htaccess or index.php override.
              So you can remove,
              $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
              $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;



              • References:


              • devdocs.magento.com/v2.3/config-guide/multi-site/ms_apache.html


              • devdocs.magento.com/guides/v2.3/config-guide/multi-site/ms_websites.html#multi-storecode-baseurl

              • docs.magento.com/m2/ce/user_guide/stores/store-urls.html






            share|improve this answer























            • After remove $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode; $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType; still getting same error @Milind Singh

              – zus
              Jan 4 at 7:57











            • @zus Have you included the store code in URLs from admin config ?

              – Milind Singh
              Jan 4 at 8:45











            • Also can you add first_store in apache conf

              – Milind Singh
              Jan 4 at 8:47











            • I just want to know how can i add both @Milind Singh

              – zus
              Jan 4 at 8:51












            • can you pls join with chat.stackexchange.com/rooms/87829/… @Milind Singh

              – zus
              Jan 4 at 9:09
















            2














            1. Check that you have enabled To include the store code in URLs as explained in user guide here.


            2. Try to either the .htaccess or index.php override.
              So you can remove,
              $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
              $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;



              • References:


              • devdocs.magento.com/v2.3/config-guide/multi-site/ms_apache.html


              • devdocs.magento.com/guides/v2.3/config-guide/multi-site/ms_websites.html#multi-storecode-baseurl

              • docs.magento.com/m2/ce/user_guide/stores/store-urls.html






            share|improve this answer























            • After remove $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode; $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType; still getting same error @Milind Singh

              – zus
              Jan 4 at 7:57











            • @zus Have you included the store code in URLs from admin config ?

              – Milind Singh
              Jan 4 at 8:45











            • Also can you add first_store in apache conf

              – Milind Singh
              Jan 4 at 8:47











            • I just want to know how can i add both @Milind Singh

              – zus
              Jan 4 at 8:51












            • can you pls join with chat.stackexchange.com/rooms/87829/… @Milind Singh

              – zus
              Jan 4 at 9:09














            2












            2








            2







            1. Check that you have enabled To include the store code in URLs as explained in user guide here.


            2. Try to either the .htaccess or index.php override.
              So you can remove,
              $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
              $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;



              • References:


              • devdocs.magento.com/v2.3/config-guide/multi-site/ms_apache.html


              • devdocs.magento.com/guides/v2.3/config-guide/multi-site/ms_websites.html#multi-storecode-baseurl

              • docs.magento.com/m2/ce/user_guide/stores/store-urls.html






            share|improve this answer













            1. Check that you have enabled To include the store code in URLs as explained in user guide here.


            2. Try to either the .htaccess or index.php override.
              So you can remove,
              $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode;
              $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType;



              • References:


              • devdocs.magento.com/v2.3/config-guide/multi-site/ms_apache.html


              • devdocs.magento.com/guides/v2.3/config-guide/multi-site/ms_websites.html#multi-storecode-baseurl

              • docs.magento.com/m2/ce/user_guide/stores/store-urls.html







            share|improve this answer












            share|improve this answer



            share|improve this answer










            answered Jan 4 at 7:34









            Milind SinghMilind Singh

            658215




            658215












            • After remove $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode; $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType; still getting same error @Milind Singh

              – zus
              Jan 4 at 7:57











            • @zus Have you included the store code in URLs from admin config ?

              – Milind Singh
              Jan 4 at 8:45











            • Also can you add first_store in apache conf

              – Milind Singh
              Jan 4 at 8:47











            • I just want to know how can i add both @Milind Singh

              – zus
              Jan 4 at 8:51












            • can you pls join with chat.stackexchange.com/rooms/87829/… @Milind Singh

              – zus
              Jan 4 at 9:09


















            • After remove $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode; $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType; still getting same error @Milind Singh

              – zus
              Jan 4 at 7:57











            • @zus Have you included the store code in URLs from admin config ?

              – Milind Singh
              Jan 4 at 8:45











            • Also can you add first_store in apache conf

              – Milind Singh
              Jan 4 at 8:47











            • I just want to know how can i add both @Milind Singh

              – zus
              Jan 4 at 8:51












            • can you pls join with chat.stackexchange.com/rooms/87829/… @Milind Singh

              – zus
              Jan 4 at 9:09

















            After remove $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode; $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType; still getting same error @Milind Singh

            – zus
            Jan 4 at 7:57





            After remove $params[MagentoStoreModelStoreManager::PARAM_RUN_CODE] = $mageRunCode; $params[MagentoStoreModelStoreManager::PARAM_RUN_TYPE] = $mageRunType; still getting same error @Milind Singh

            – zus
            Jan 4 at 7:57













            @zus Have you included the store code in URLs from admin config ?

            – Milind Singh
            Jan 4 at 8:45





            @zus Have you included the store code in URLs from admin config ?

            – Milind Singh
            Jan 4 at 8:45













            Also can you add first_store in apache conf

            – Milind Singh
            Jan 4 at 8:47





            Also can you add first_store in apache conf

            – Milind Singh
            Jan 4 at 8:47













            I just want to know how can i add both @Milind Singh

            – zus
            Jan 4 at 8:51






            I just want to know how can i add both @Milind Singh

            – zus
            Jan 4 at 8:51














            can you pls join with chat.stackexchange.com/rooms/87829/… @Milind Singh

            – zus
            Jan 4 at 9:09






            can you pls join with chat.stackexchange.com/rooms/87829/… @Milind Singh

            – zus
            Jan 4 at 9:09














            0














            You need to set the Base URL for the store view in the admin. I had the same issue until I did that.






            share|improve this answer



























              0














              You need to set the Base URL for the store view in the admin. I had the same issue until I did that.






              share|improve this answer

























                0












                0








                0







                You need to set the Base URL for the store view in the admin. I had the same issue until I did that.






                share|improve this answer













                You need to set the Base URL for the store view in the admin. I had the same issue until I did that.







                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered 8 hours ago









                mluntmlunt

                7619




                7619



























                    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%2f256694%2fmagento-2-3-0-multi-website-store-url-return-404-error%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

                    Magento 2 duplicate PHPSESSID cookie when using session_start() in custom php scriptMagento 2: User cant logged in into to account page, no error showing!Magento duplicate on subdomainGrabbing storeview from cookie (after using language selector)How do I run php custom script on magento2Magento 2: Include PHP script in headerSession lock after using Cm_RedisSessionscript php to update stockMagento set cookie popupMagento 2 session id cookie - where to find it?How to import Configurable product from csv with custom attributes using php scriptMagento 2 run custom PHP script

                    Can not update quote_id field of “quote_item” table magento 2Magento 2.1 - We can't remove the item. (Shopping Cart doesnt allow us to remove items before becomes empty)Add value for custom quote item attribute using REST apiREST API endpoint v1/carts/cartId/items always returns error messageCorrect way to save entries to databaseHow to remove all associated quote objects of a customer completelyMagento 2 - Save value from custom input field to quote_itemGet quote_item data using quote id and product id filter in Magento 2How to set additional data to quote_item table from controller in Magento 2?What is the purpose of additional_data column in quote_item table in magento2Set Custom Price to Quote item magento2 from controller

                    How to solve knockout JS error in Magento 2 Planned maintenance scheduled April 23, 2019 at 23:30 UTC (7:30pm US/Eastern) Announcing the arrival of Valued Associate #679: Cesar Manara Unicorn Meta Zoo #1: Why another podcast?(Magento2) knockout.js:3012 Uncaught ReferenceError: Unable to process bindingUnable to process binding Knockout.js magento 2Cannot read property `scopeLabel` of undefined on Product Detail PageCan't get Customer Data on frontend in Magento 2Magento2 Order Summary - unable to process bindingKO templates are not loading in Magento 2.1 applicationgetting knockout js error magento 2Product grid not load -— Unable to process binding Knockout.js magento 2Product form not loaded in magento2Uncaught ReferenceError: Unable to process binding “if: function()return (isShowLegend()) ” magento 2