cancel
Showing results for 
Search instead for 
Did you mean: 

How can i setup two base urls with single database ?

How can i setup two base urls with single database ?

hi guys, here i want  to present a concept i.e two magento base urls with single database 

how can i acheive that ? can anyone guide me on that ? 

5 REPLIES 5

Re: How can i setup two base urls with single database ?

Hello @bharath553,

 

Please refer this blog https://www.properhost.com/support/kb/30/How-To-Setup-Magento-With-Multiple-Stores-And-Domains

 

--
If my answer is useful, please Accept as Solution & give Kudos

Re: How can i setup two base urls with single database ?

Hi @bharath553

 

Please refer this blog https://blog.landofcoder.com/magento-2-multiple-stores-guide/

 

 

------------------------------------------------
If you've found one of my answers useful, please give"Kudos" or "Accept as Solution"

Re: How can i setup two base urls with single database ?

Hello @bharath553,

 Please follow this link: https://devdocs.magento.com/guides/v2.0/config-guide/multi-site/ms_websites.html

 

And adding following code in .htaccess file:

SetEnvIf Host [domain1] MAGE_RUN_CODE=[website1 code]
SetEnvIf Host [domain1] MAGE_RUN_TYPE=website 
SetEnvIf Host [domain2] MAGE_RUN_CODE=[website2 code] 
SetEnvIf Host [domain2] MAGE_RUN_TYPE=website

 

Thanks,

 

--
If my answer is useful, please Accept as Solution & give Kudos

Re: How can i setup two base urls with single database ?

can i apply above solutions in local machine ? is this possible ?

Re: How can i setup two base urls with single database ?

Yes, you can try this solution for local machine.

 

Thanks