How to get Configuration->Web->Base URLs -> Base URL in multi store magento 2. I have enabled Add Store Code to Urls
I have use on phtml page but it return me url with store code and I need only base url without store code:
<?php echo $block->getBaseUrl();?>
Output of above code is www.example.com/de
and my requirement is www.example.com
This is magento1 code.
Mage::getStoreConfig(Mage_Core_Model_Url::XML_PATH_UNSECURE_URL);
I need it in magento 2.
Best Answer
I have found solution. Bellow is my code.
Thanks.