【问题标题】:joomla - how do I change the subdirectory in the links?joomla - 如何更改链接中的子目录?
【发布时间】:2009-02-27 07:42:41
【问题描述】:

我在 localhost 的子目录“joomla”下创建了我的网站。现在我已将此网站移植到我的托管服务器上的另一个子目录“testing”下。这样做之后,每当我使用任何创建的菜单项时,他们都会尝试在“joomla”文件夹下找到一个页面,而不是“testing”

所以链接类似于http://www.mydomain.com/joomla/articleid=... 而不是http://mydomain.com/testing/articleid=...

我应该对哪个文件进行此更改以及在文件中的什么位置?我尝试查看 configuration.php,但不知道应该在哪里进行更改。

这只是主页上使用的菜单的问题(我的主页是自定义页面)我还注意到主页没有直接访问/testing/images文件夹中的图像。我必须将 /testing 显式添加到图像 src。

谢谢。

【问题讨论】:

    标签: content-management-system joomla


    【解决方案1】:

    查看configuration.php 文件。您必须更改几个变量:

    在 Joomla 1.0 中:

    $mosConfig_absolute_path = 'C:/webroot/joomla';
    $mosConfig_cachepath = 'C:/webroot/joomla/cache';
    $mosConfig_live_site = 'http://localhost/joomla';
    // change to:
    $mosConfig_absolute_path = '/home/username/www/testing';
    // of course, use your own path here - find it out with php_info()
    $mosConfig_cachepath = '/home/username/www/testing/cache';
    $mosConfig_live_site = 'http://www.mydomain.com/testing';
    

    在 Joomla 1.5 中:

    var $log_path = '/home/username/www/testing/logs';
    var $tmp_path = '/home/username/www/testing/tmp';
    var $live_site = 'http://www.mydomain.com/testing';
    

    【讨论】:

      【解决方案2】:

      如果您要多次执行此迁移,我建议使用像joomlapack 这样的备份/迁移工具 - 它使从本地主机迁移到生产环境的任务不到 2 分钟。在传输中也包括数据库和模块/组件。从 localhost 中的一个目录结构移动到生产中的另一个目录结构没有问题。

      【讨论】:

        猜你喜欢
        • 2013-04-16
        • 2017-09-08
        • 2015-12-19
        • 2012-02-21
        • 1970-01-01
        • 2015-04-03
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多