Magento is automatically redirecting to localhost on live server

后端 未结 7 2634
一生所求
一生所求 2021-02-15 18:12

I have uploaded my website on live server from localhost in magento

and when i m writing the url e.g: http://unbeatablewatches.com it is redirecting to localhost/unbeata

7条回答
  •  梦毁少年i
    2021-02-15 18:45

    The answer that vasily-l posted is some what correct and worked for me.

    However, protocols are required as per the magento documentation otherwise you will receive errors stating that the url is invalid. A trailing slash should also be used:

    $ bin/magento setup:store-config:set --base-url="http://www.example.com/"
    $ bin/magento setup:store-config:set --base-url-secure="https://www.example.com/"

    The commands should be run from the magento root directory.

    It is also best to note that these commands would be for Magento 2.x not Magento 1.x

    Source: Magento DevDocs: Configure the store

    PS: Didn't have enough rep to comment.

提交回复
热议问题