2017-03-15 6 views
0

サブドメインを使用してMagento 1.9.xマルチサイト構成を作成する予定ですが、解決策が見つけられません。私は(https://www.properhost.com/とMagentoのサポートフォーラム)に記載されているすべての手順を踏んだが、シンプルで良い解決策が見つからなかったか、わかりません。サブドメインを使用してDNS設定を使用してマルチサイトを作成するための非常に明確なガイドを教えてください。Magento 1.9.xマルチサイト構成

私の場合。私はhttp://m1.psoft.co.in (マゼンタベースドメイン)ap.psoft.co.in(Andhra Pradeshのサブドメインと店舗Nellore Gudur &オンゴール)とtn.psoft.co.in(都市のチェンナイとプドゥシェリとのタミルナンドのドメイン)を配備しました。詳細が必要な場合はお知らせください。

答えて

1

新しいウェブサイトのindex.phpと.htaccessを含むサブフォルダを追加しましたか?例えば

: index.phpを(この1つはMagentoのルートインデックスである) ... TN /(ウェブサイトのインデックス用のサブフォルダ) のindex.php(このインデックスファイルは、TNのウェブサイトのドメインを指摘しなければならない) https://www.crucialhosting.com/knowledgebase/setup-multiple-magento-stores

:あなたが詳細については、このリンクを参照することができ

<?php 
/** 
* Magento 
* 
* NOTICE OF LICENSE 
* 
* This source file is subject to the Open Software License (OSL 3.0) 
* that is bundled with this package in the file LICENSE.txt. 
* It is also available through the world-wide-web at this URL: 
* http://opensource.org/licenses/osl-3.0.php 
* If you did not receive a copy of the license and are unable to 
* obtain it through the world-wide-web, please send an email 
* to [email protected] so we can send you a copy immediately. 
* 
* DISCLAIMER 
* 
* Do not edit or add to this file if you wish to upgrade Magento to newer 
* versions in the future. If you wish to customize Magento for your 
* needs please refer to http://www.magento.com for more information. 
* 
* @category Mage 
* @package  Mage 
* @copyright Copyright (c) 2006-2017 X.commerce, Inc. and affiliates (http://www.magento.com) 
* @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) 
*/ 
if (version_compare(phpversion(), '5.2.0', '<')===true) { 
     echo '<div style="font:12px/1.35em arial, helvetica, sans-serif;"><div style="margin:0 0 25px 0; border-bottom:1px solid #ccc;"><h3 style="margin:0; font-size:1.7em; font-weight:normal; text-transform:none; text-align:left; color:#2f2f2f;">Whoops, it looks like you have an invalid PHP version.</h3></div><p>Magento supports PHP 5.2.0 or newer. <a href="http://www.magentocommerce.com/install" target="">Find out</a> how to install</a> Magento using PHP-CGI as a work-around.</p></div>'; 
     exit; 
    } 

    require '../app/bootstrap.php'; // added ../ here because of subfolder 

    /** 
    * Compilation includes configuration file 
    */ 
    $compilerConfig = 'includes/config.php'; 
    if (file_exists($compilerConfig)) { 
     include $compilerConfig; 
    } 

    $mageFilename = '../app/Mage.php'; // added ../ here because of subfolder 

    if (!file_exists($mageFilename)) { 
     if (is_dir('downloader')) { 
      header("Location: downloader"); 
     } else { 
      echo $mageFilename." was not found"; 
     } 
     exit; 
    } 

    require_once $mageFilename; 

    #Varien_Profiler::enable(); 

    if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) { 
     Mage::setIsDeveloperMode(true); 
    } 

    #ini_set('display_errors', 1); 

    umask(0); 

    $mageRunCode = 'tn1'; // your website code 
    $mageRunType = 'website'; // runType is website 

    Mage::run($mageRunCode, $mageRunType); 

:.htaccessの

は、TN/index.phpファイルには、このような何かをする必要がありcontaine

それとも、サブディレクトリを作成せずに、第二の方法を使用することができます。

ステップ1:ポイントMagentoのルートディレクトリにすべてのドメイン、Webサーバ(Apacheやnginxの)構成で、すなわち同じドキュメントルート。

ステップ2:Magento管理パネルのシステム設定で、各WebサイトのベースURLとしてドメイン名を設定します。

手順3:.htaccessまたはWebサーバー構成の環境変数として、各ドメインのストアまたはWebサイトを設定します。質問で与えられるウェブサイトと

  • 例: SetEnv MAGE_RUN_TYPE website SetEnvIf Host abc.com MAGE_RUN_CODE=domain1 SetEnvIf Host tn.com MAGE_RUN_CODE=domain2
  • 例ストアビューの代わりに、ウェブサイト SetEnv MAGE_RUN_TYPE store SetEnvIf Host abc.com MAGE_RUN_CODE=store_code_1 SetEnvIf Host tn.com MAGE_RUN_CODE=store_code_2

を持つドメインは「abc.com」または「XYZが含まれている場合は、これらの構成はチェック同じ.htaccessファイルを使用して、サブドメインやabc.com.testserver.comやtest.abc.comなどのテストシステムとのマッチングも便利です。正確に一致させるには、abc.comを^ abc.comに置き換えてください。

ステップ4:キャッシュをクリアしてドメインにアクセスします。

このアンサーを参照してください。https://magento.stackexchange.com/questions/32439/magento-1-9-multiple-websites-on-different-domains

関連する問題