我在共享文件夹的根文件夹(即public/www/)中运行了一个MODX站点. 我还在子文件夹(public/www/modxtest)中运行了一个MODX测试站点.
I have an MODX site running on the shared server in the root folder (i.e. public/www/). I also have an MODX testing site running in the subfolder (public/www/modxtest).
我想将此测试站点移到根目录中,以使根文件夹中的modx站点在迁移结束之前不受影响.
I want to move this testing site into the root in a way that the modx site in root folder is not affectetd until the end of migration.
我以前没有接触过MODX,也不知道迁移过程.
I haven't touched MODX before and do not know the migration procedure.
一种实现方法是使用htaccess文件,然后将请求重定向到根MODX站点,并将其重定向到子文件夹MODX站点,如 my.bluehost/cgi/help/347
One way of doing that may be using htaccess file and redirect the request to the root MODX site to the subfolder MODX site as in my.bluehost/cgi/help/347
此方法可能会使其他人感到困惑,因为他们不知道会发生这种重定向,并且可能碰巧删除了以"test"为前缀的子目录.
This method might get confusing for other person as they wouldn't know this redirection happening and might happen to delete the subdirectory as prefixed 'test'.
从子文件夹完全迁移到根文件夹的更好和可靠的方法是什么?
What could be the better and reliable way for complete migration from subfolder to the root folder?
预先感谢
推荐答案您没有指定要使用的Modx版本,但我认为它是Revo.
You don't specify which version of Modx you are using, but I assume it is Revo.
移动Revo网站可能很困难,但是我已经做了好几次了,所以我列出了我要做的事情的简单清单.
Moving a Revo-site can be difficult, but I've done it several times, so I've made a simple list over things that I have to do.
要找到完整的路径,此PHP脚本应具有魔力:
To find your full path, this PHP-script should do the magic:
<?php echo dirname(__FILE__); ?>将其放置在Modx根目录中.这将是您的根路径.
Place this in the Modx-root. This will be your root-path.
这应该是一种防弹的好方法,但是请记住备份所有文件,并在更改路径和URL时要小心.
This should be a pretty bulletproof way to do it, but remember to take backup of all your files and be careful when changing paths and urls.
更多推荐
将Modx站点从子文件夹移动到
发布评论