Question

Glad I was directed to this site. any help would be much appreciated!

I am developing my first Magento site. I have a VPS server. I copied my current website over to a /TEMP folder. I have created a subdomain for the /TEMP folder store.mydomain.com

Magento is going to be installed on my main domain and /public_html folder

I would like to redirect anyone who visits mydomain.com and send them to store.mydomain.com

What is the best way to do this after I install magento?

Was it helpful?

Solution

Just configure "store.mycomain.com" as your store URL in System > Config > Web > Base URL.

Then ask your provider to connect both "mydomain.com" and "store.mydomain.com" to your Magento installation path.

Magento will automatically redirect each request to "store.mydomain.com".

Hope it helps.

OTHER TIPS

Make sure that you change the secure and non-secure web address in the core_data of the database. Then - after you make that change, make sure to clear the var/session folder and the var/cache folder.

This should allow you to run the store as the new URL store.mydomain.com.

If you are actually talking about running magento on the same server and having BOTH run from the public_html folder and then also the public_html/TEMP folder - you'll need to configure the apache to point to a new website located at public_html/TEMP. This can be done by creating a new website/file in the etc/apache2/sites-available section, and running a2ensite on it with a apache2 restart.

Additionally, you'll need to make a copy of the production database, and then edit the local.xml file in the TEMP install to point to the copy. Finally, update core_data to update the URLs, clear session and cache folders, and you should be good to go.

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top