我一直在关注http://www.magentocommerce.com/boards/viewthread/71318/来帮助我在我的服务器上设置双 TLD,指向一个商店,这样您就可以有效地拥有两个基本路径... domain.com和 domain.co.uk 作为 2 个单独的商店,但访问一组数据等(不只是将一个转发到另一个)
这是我的文件夹结构 ,.co.uk 索引位于服务器根目录下的 .com 下(请忽略标有 .com 的文件夹)...
根据说明,我需要做两件事
1)更改我的第二个 TLD 位置上的 index.php 以反映我的单个 magento 商店 Mage.php 工作已完成
2)更改最后一行以反映我的商店代码
"Next you change the website reference on the last-ish line. You enter the reference you gave that store in the Magento admin"
对于那些可以提供帮助的人,这是位于 .com TLD 上的完整代码
<?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 license@magentocommerce.com 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.magentocommerce.com for more information.
*
* @category Mage
* @package Mage
* @copyright Copyright (c) 2008 Irubin Consulting Inc. DBA Varien (http://www.varien.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;
}
/**
* Error reporting
*/
error_reporting(E_ALL | E_STRICT);
/**
* Compilation includes configuration file
*/
define('MAGENTO_ROOT', getcwd());
$compilerConfig = MAGENTO_ROOT . '/includes/config.php';
if (file_exists($compilerConfig)) {
include $compilerConfig;
}
$mageFilename = MAGENTO_ROOT . '/app/Mage.php';
$maintenanceFile = 'maintenance.flag';
if (!file_exists($mageFilename)) {
if (is_dir('downloader')) {
header("Location: downloader");
} else {
echo $mageFilename." was not found";
}
exit;
}
if (file_exists($maintenanceFile)) {
include_once dirname(__FILE__) . '/errors/503.php';
exit;
}
require_once $mageFilename;
#Varien_Profiler::enable();
if (isset($_SERVER['MAGE_IS_DEVELOPER_MODE'])) {
Mage::setIsDeveloperMode(true);
}
#ini_set('display_errors', 1);
umask(0);
/* 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);
很明显它是这里的最后几行,但我不知道我需要将它设置为什么......
查看我的magento商店列表,我有
您可以从我的屏幕截图中看到,我添加了一家新商店,但它是我应该添加的新网站吗?
并将说 base 的部分更改为替代项?也许是完整的 URL?
我不想乱七八糟,以防我无法恢复它,你看
我添加站点、商店、商店视图的选项
我目前有 2 家商店的设置
.com - 商店设置
.co.uk - 商店设置
主网站(网站设置)
需要尽快得到这个直播,所以任何帮助都会很棒......希望其他尝试做同样事情的人将从这里的人们的投入和协作中学习
亨利