Magento 1.6.2 Multiple Stores - magento

I am trying to integrate multiple magento sites within the one installation. From what I have found i need to use a parked domain method however I have tried various methods to get it all working however I keep getting the 2nd store redirecting to the main store so I am looking for the best method to allow me to run multiple websites.
Any help is greatly appreciated

We currently have 4 stores all sharing one Magento installation & set of products. Each has it's own unique URL.
Create your Stores
Go to System -> Manage Stores
Click on Create Website. In the Name field, enter your store name. In the Code field, enter a unique code [lowercase & without spaces - we're going to give it a code of domain1 for our example] (to be used later) & Save.
Click on Create Store. In the Website field, select the website from step 2. In the Name field, enter a name. In the Root Category field, select the Root Category for your store & Save.
Click on Create Store View. Select the store you just created (from the dropdown menu) for Store. Type a name for your store in the Name field (Example from Magento is English Store). In the Code field, enter a unique string to identify the store view (just like for your store). Change the Status to Enabled & Save.
Repeat for all your stores
Configure your stores in the Magento Admin Configuration Section
Go to System -> Configuration
In the Store Scope (top-left dropdown), choose your first Store.
Choose Web from the Left-side menu
Open the Unsecure & Secure sections
Change the domains to what they would be (i.e. - http://www.domain1.com/) Don't forget the trailing slash at the end
Repeat for all stores
Server Config (for Magento versions 1.4.0.1 and greater)
Point your domain (e.g. - www.domain1.com) to your server where your single Magento instance is installed
Set up a Pointer/Parked domain on your server (see your Host's instructions or contact them)
In the .htaccess file on the root of your install, put in the following code for each of your stores
SetEnvIf Host .*domain1.com
MAGE_RUN_CODE=domain1 <- This was your important code from step 2 under Create your Stores SetEnvIf Host
.*domain1.com MAGE_RUN_TYPE=website
This set of 2 must be repeated for every domain you have.
For our particular stores/domains (might find useful)
Some servers, particularly those running Litespeed Web Server, the SetEnvIf directive does not get recognized in the .htaccess file. This was particularly true for us.
We had to do the following
Find RewriteBase / or RewriteBase /magento/ or etc
RewriteCond %{HTTP_HOST} .domain1.com [NC]
RewriteRule . - [E=MAGE_RUN_CODE:domain1]
RewriteCond %{HTTP_HOST} .domain1.com [NC]
RewriteRule . - [E=MAGE_RUN_TYPE:website]
We also have symlinks set up on our server (under each or our domains) to point to our main domain's folders (for the app, includes, js, lib, media, shell, skin, var)

Multi Store in Magento v1.6.2
in the VirtualHost configuration set the DocumentRoot to where you have your Magento installed (something like /var/www/magento), so it will be the same for every domain as we want only one Magento install for each domain
in Magento's admin, go to System -> Manage Stores and create your websites with their stores and store views (before that you'll have created one root category for each website). Reindex after everything is created
go to System -> Configuration and change the scope (the dropdown on the upper left) to one of the website. Go to the (General) Web -> Unsecure tab, uncheck the "Use Default" and indicate the domain in the Base URL field. Do the same for the secure
open the .htaccess at the root of your Magento install and at the end of it add the rules to determine which website to show according to the domain. For example, if you have set the codes website1 for domain1.com and website2 for domain2.com, put this:
SetEnvIf Host ^domain1.com$ MAGE_RUN_CODE=website1
SetEnvIf Host ^domain2.com$ MAGE_RUN_CODE=website2
SetEnv MAGE_RUN_TYPE website
and you're all set :)
HTH

Did you change your base urls for the second store configuration?
Navigate to:
System>Configuration>Web>Unsecure
System>Configuration>Web>Secure
Then change the Current Configuration Scope (top of left sidebar): your second store config
Deselect use default and enter your second store's path:
Base URL : http://yourdomain.com/
Secure Base URL: https://yourdomain.com/

Related

Multiple Custom Admin URL

im trying to have the same backend but with multiple subdomains. first i created one of my subdomains in the backend has showen in this image above.
And is working fine, but not i need the same backend with another subdomain for example "sync.mydomain.com", but i cant find any information on magento docs in configuring custom admin url in multiple domains. Does someone have any idea if it is possible to configure it on magento?
In order to make magento work with multiple domains, you need to make few steps.
System->Manage Stores -> Create Store Fill in the store fields,
taking care that the Website and Root Category are the same as your
primary site.store. Save Store
Create Store View Fill in the store view fields, change Store to the
new store you just created, give your store view a Name (spaces ok),
a code and make sure it’s enabled, after that save the store view.
System->Configuration->Web Change the scope on the upper left to your newly created store view
Change Unsecure->Base URL to your second domain (You’ll have to uncheck Use Website)
Change Secure->Base URL to your second domain (You’ll have to uncheck Use Website)
Save Config
Open the .htaccess at the root of your Magento install
Add the following, obviously changing the values with your own:
SetEnvIf Host www.mysecondarydomain.com MAGE_RUN_CODE=yoursecondarystoreviewcode
SetEnvIf Host ^mysecondarydomain.com MAGE_RUN_CODE=yoursecondarystoreviewcode
Clear the cache and re-index the site.
Here is the article for more information:
http://madproject.com/programming/magento-one-site-multiple-domains/

How to add subdomain to Magento?

I need to create geo subdomain for one city (for example shop.com & london.shop.com). I want the same store. But also I want to have different pages like:
london.shop.com/contacts & shop.com/contacts.
I use magento 1.9.2.1
you need to create multiple websites and store for different domain.create one folder on root and put index.php and .htaccess file and change in index.php store name or website name at last.
Please refer below link
http://inchoo.net/magento/how-to-set-multiple-websites-with-multiple-store-views-in-magento/

Magento Multiwebsite Configuration Setup

I am using multi website magento store having 3 websites for books,electronics and apparels in subdirectories like www.example.com/books, www.example.com/apparels. Is it necessary to include all folders like app, downloader, skin, etc in root folder to subdirectories or any other option is there because it seems to consume more memory for each one.
I manage one Magento site with two stores (two totally different URLs) operating from one instance of Magento. Each URL points to a different base directory on the hosting site. One directory holds the entire Magento installation. The second directory uses a combination of symbolic links and actual files as follows.
Symbolic links: app, errors, includes, js, media, skin, var
Actual files: .htaccess, index.php
www-root/directory1/[all magento files]
www-root/directory2/[symbolic links and .htaccess and index.php files]
You then set the insecure and secure base URLs for each store. In this case there is a separate root category for each store. And many of the Magento configuration parameters may be set individually for each store or use the default value.
No, you don't have to.
You can create multiple stores from system -> Manage Stores -> Create Store, if you don't have them already.
You can manage the url of the stores from system -> configuration -> Web and set secure and unsecure base url for each store by selecting the configuration scope on the top left.
E.g.: You can select the scope to 'books' store and set base url to www.example.com/books and set the scope to 'apparels' store and set base url to www.example.com/apparels.
Edit:
You also have to copy the index.php to the subfolder and edit this file. E.g. for www.example.com/apparels, add:
$mageRunCode = 'apparels';
$mageRunType = 'website';
before the line:
Mage::run($mageRunCode, $mageRunType);
Also try to copy the .htaccess to the subdirectory.
No, you no need to copy all folder , you need to create folder for books & apparels then copy your index.php and .htaccess file from magento root folder to existing folder (both books & apparels) also you need to set base url in magento adminpanel > system > configuration > web for new stores

magento base url for root category

I have several windows in one shop. How can I make Magento use Base URL of Magento settings? Now it duplicates the same item for all windows even if the shop is attached to the catalogue’s root directory.
It means that one item exists on different domains but it placed in the same category of the catalogue
subdomain1/nokia1280
...
subdomain3/nokia1280
URL Rewrite Management does not help
I am not sure what the question is but if you want to use multible domains with products you should do the following:
Foreach subdomain
Redirect the subdomain to the magento shop ( vhost alias for example )
Change the .htaccess to set the environment based on Referer
Add a new Root category for this domain
Create a new Store with Storeview
Go to Sysem => Configuration => Web and select the storeview top left
Change the base URLS to the subdomain for this store.
Go to System => Configuration => Design and change the template / skin / layout for this store
Now will your subdomain be loaded within his own environment, with his own template and skin.
More information
Use websites
Notice that users will be shared along the different domains. If you
don`t want this you should go a level further and make more websites.
.htaccess set environment
SetEnvIf Host sub1.website.dev MAGE_RUN_CODE=subdomain1
SetEnvIf Host sub1.website.dev MAGE_RUN_TYPE=store
SetEnvIf Host sub2.website.dev MAGE_RUN_CODE=subdomain2
SetEnvIf Host sub2.website.dev MAGE_RUN_TYPE=store
Hope this will help !
Good luck.

magento category url,admin 404 error

I am a magento newbie.
I've observed that when I make an installation of magento by copying all contents of the extraction directly to localhost.... i.e (when app, media, skin, index.php etc all pasted directly in localhost) I am unable to access the admin by simply typing in localhost/admin.
Whereas I have to type in localhost/index.php/admin to get into the admin panel.
Also when i click on any category i have the same problem.
I have to append index.php/ before the category name to get the category link working.
Can anyone please tell me how to get them working.
Check your Base URL in the Admin Panel, go to System | Configuration | Web and make sure the Secure and Unsecure Base URL does not include the 'index.php' part.
If you do not have index.php in my secure or unsecure web configuration and this happening on front end and back end, try to enable url rewrites and see if that solves it. You need mod_rewrite enabled on your localhost.
What is your local server?

Resources