Change over your domain name servers, and then contact your hosting provider to change the domain on your account. Then go to your admin panel > configuration > web > secure/unsecure dropdowns - - - and change your domains.
I can change my domains destination folders… as I did… And the home page is works, but if i go to a other page Ive got a 500 Internal Error.
I find one alternative:
I created a new folder in my root acount.. and copied the index.php, and .htaccess to that folder.
I changed in the index.php:
$mageFilename = ‘../magento/app/Mage.php’;
and
Mage::run(’mywebsitename’,’website’);
and I pointed my domain to that folder…
I had the same internal error so what I changed th .htacces:
## rewrite everything else to index.php
RewriteRule .* /index.php [L]
to
## rewrite everything else to index.php
RewriteRule .* / [L]
oh yeah and I had to turn off in the admin the modrewrite thing too…
I’ve got 3 store views set up (for different languages) and I want each domain name to bring up a different store view. Eg if I go to domain.co.nz it’ll bring up the New Zealand store view, or if I go to domain.com.au it’ll bring up the Australian store view.
Currently both domains resolve to the same host, but what needs to be changed on the backend to allow this?
All the solutions I’ve seen so far only allow you to do this if you have separate websites, rather than just separate store views.
You can definitely do this. I have several Magneto installations with a variety of URL combos. It does get a little confusing though depending on which scenario you’re trying to execute, so bear with me please.
If you have multiple storeviews in the same Magento website (say by country) and you want the URLs to be:
http://www.company.com/us http://www.company.com/uk http://www.company.com/de
Then you can do this all via the Admin Panel without too much difficulty. The base URL needs to be set to http://www.company.com/ (ADMIN> System> Configuration--web tab). On the same page, set the URL Options to be Add Store Code to URLs=Yes. Now whatever you set the storeview code to be in ADMIN> Manage Stores is what you type after http://www.company.com/ on the frontend to get to the store.
If you have multiple storeviews in the same Magento website and you want the URLs to be:
http://www.company.com http://www.company.co.uk http://www.company.de
This you can’t accomplish only through the Admin Panel. In the Admin Panel you’ll need to set the base URL of each of these stores individually to what you’ll want it to be (.com, .co.uk, .de, etc.). But DON"T do that yet ‘cause if you do before you have the rest of this set up you can’t see your store anymore. The rest of the story is that you have to change your server config files to recognize the domains and you have to change your index.php file to fire off the right Magento store.
There are probably as many ways to set up the configuration to recognize your domain as there are unix installations, but we just create conf files for the domain in /etc/httpd/conf.d and set the virtual host and serverAliases in a that conf file. (Reload the server when you’re done.) Since I’m not a unix sys admin, I’ll just leave it at that, you can talk to your host or your favorite unix sys admin type. If you say any of the magical words above they’ll likely know what to do.
So now the server will recognize the domain name and send it to your Magento installation, but Magento is just going to always kick off your default store unless you change the index.php file for that Magento installation. Go to the very bottom of the index.php file. There’s a run command:
Mage::run('default');
Replace it with a switch statement for all your domains. One of mine looks like this:
$host = explode(':', $_SERVER['HTTP_HOST']); $dname = substr($host[0], -3,3); switch ($dname) { case '.it': $store = 'it'; break; case '.de': $store = 'de'; break; case '.au': $store = 'au'; break; case '.uk': $store = 'uk'; break; case '.be': $store = 'nl_be'; break; case '.fr': $store = 'fr'; break; case '.nl'; $store = 'nl'; break; default: $store = ''; } Mage::run($store);
In those $store = ‘xx’ lines, xx is the storeviewCode set in Manage Stores when you created each store view. You can change them to whatever you want as long as you’re changing the index.php file.
Then at your domain name registrar, repoint the domain names to the IP of your Magento installation. Once it propagates, this is when you go back to the Admin Panel and change the base URL to your final domain. Then it actually works. Promise.
Crucial Web Host wrote a great tutorial on setting up multiple stores. It’s at http://www.crucialwebhost.com/blog/how-to-setup-multiple-magento-stores/. Their instructions assume you have some sort of control panel to set up the server aliases and they don’t have you messing around with the conf.d files, but that wasn’t the environment I have. But maybe one of these approaches will work for you.
...I’m very clear on the methods for subdirectories, but totally stumped on ‘why’ one method and not the other!!
I’m wanting to create different stores on different subdirectories (mysite.com/a, mysite.com/b, etc. with same products, different languages and using currency conversion, unique articles) under the one ‘website’. I’ve read your method above amongst other places, where you just set “Add Store Code to Urls” to Yes. This suggests that NO physical subdirectories are actually created but that they are kind of “mimicked”.
I have read multiple threads and cannot get the tabs at the top to configure. I need it set up as a second site so I can run different payment configurations, instead of a second store. I need to be able to capture the cc information on the second site as we do not process them right away, but I need to process the cards on the first as the order is placed. Hince the two sites and not just two stores.
Or is there a way to implement a payment module like I need and then I can use the two stores. That I have gotten to work.
I was going to do this using version 1.5.0.1 but I realized that the index.php file has this code:
/* Store or website code */ $mageRunCode = isset($_SERVER['MAGE_RUN_CODE']) ? $_SERVER['MAGE_RUN_CODE'] : '';
/* Run store or run website */ $mageRunType = isset($_SERVER['MAGE_RUN_TYPE']) ? $_SERVER['MAGE_RUN_TYPE'] : 'store';
Mage::run($mageRunCode, $mageRunType);
Now my question is if I still have to change the index file or if this version already is made to achieve this in admin panel. Although I can’t see any fields for this in config tab…