【发布时间】:2019-09-11 21:10:32
【问题描述】:
我有一个新手问题,你可以很容易地帮助我。我已经在root中安装了OC。我想将它移动到根目录中的子文件夹。例如,如果我有 www.mysite.com,我想将其移动到 www.mysite.com/Subfolder。我已通过根目录中的 htaccess 将 www.mysite.com 重定向到 www.mysite.com/Subfolder。我需要对 config.php 和 admin/config.php 以及子文件夹中的 htaccess 进行哪些更改。我是否也需要更改子文件夹中的其他文件?如何处理 www.mysite.com 中的数据库?我需要在哪里导出它?我怎样才能做到这一点?我正在使用 OC 3.0.2.0。如果有任何帮助,我将不胜感激。 我的子文件夹 config.php 看起来像这样
define('HTTP_SERVER', 'http://www.example.com/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/catalog/');
define('DIR_SYSTEM', '/home/user/public_html/system/');
define('DIR_IMAGE', '/home/user/public_html/image/');
define('DIR_STORAGE', '/home/user/storedata1/storage/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/theme/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
我的子文件夹管理员 config.php 看起来像这样
// HTTP
define('HTTP_SERVER', 'http://www.example.com/admin/');
define('HTTP_CATALOG', 'http://www.example.com/');
// HTTPS
define('HTTPS_SERVER', 'http://www.example.com/admin/');
define('HTTPS_CATALOG', 'http://www.example.com/');
// DIR
define('DIR_APPLICATION', '/home/user/public_html/admin/');
define('DIR_SYSTEM', '/home/user/public_html/system/');
define('DIR_IMAGE', '/home/user/public_html/image/');
define('DIR_STORAGE', '/home/user/storedata1/storage/');
define('DIR_CATALOG', '/home/user/public_html/catalog/');
define('DIR_LANGUAGE', DIR_APPLICATION . 'language/');
define('DIR_TEMPLATE', DIR_APPLICATION . 'view/template/');
define('DIR_CONFIG', DIR_SYSTEM . 'config/');
define('DIR_CACHE', DIR_STORAGE . 'cache/');
define('DIR_DOWNLOAD', DIR_STORAGE . 'download/');
define('DIR_LOGS', DIR_STORAGE . 'logs/');
define('DIR_MODIFICATION', DIR_STORAGE . 'modification/');
define('DIR_SESSION', DIR_STORAGE . 'session/');
define('DIR_UPLOAD', DIR_STORAGE . 'upload/');
请告诉我如何编辑我的子文件夹 config.php 和 Subfolder/admin/config.php 以及我需要将子文件夹放在哪些地方
【问题讨论】:
-
为此您只能修改
config.php、admin/config.php和.htaccess。
标签: opencart