同一域上的Wordpress和Drupal会导致htaccess冲突吗?

发布于 2024-09-28 05:58:41 字数 128 浏览 0 评论 0原文

有一位客户想要将其 Wordpress.com 博客移至已安装 Drupal 的主域。如果我将Wordpress添加到服务器上的“/blog/”目录中,是否会与htaccess(即Mod Rewrites)等发生冲突?

谢谢。

Have a client who wants to move their Wordpress.com blog over to their main domain that has a Drupal installation. If I add Wordpress to a "/blog/" directory on the server, will there be any conflicts with the htaccess ie Mod Rewrites etc?

Thanks.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

如果您将 WordPress 文件放在 /blog/ 目录中,那么不会,肯定不会有任何 htaccess 冲突。

更新:
如果您从头开始,berkes 下面的建议(即将 WordPress 和 Drupal 并排放在各自单独的文件夹中)将是一个理想的解决方案。

但是,它会更改所有现有内容的 URL,而您可能不希望这样做。

您可以做的一件事就是并排安装它们,然后使用 mod-rewrite 使 example.com/blog 转到 wordpress 目录,而其他任何内容都转到 drupal 目录。
这样,即使 drupal 安装已移动,所有现有内容仍将保留在现有 URL 处。

请注意,即使这个解决方案也会阻止 Drupal 尝试使用 /blog 路径的任何内容可见,而是重定向到 WordPress。

If you place the WordPress files within the /blog/ directory then no, there certainly shouldn't be any htaccess conflicts.

Update :
What berkes suggests below (ie putting WordPress and Drupal in their own separate folders side by side) would be an ideal solution if you were starting from scratch.

However, it would change the URLs of all existing content, which you probably don't want.

One thing you could do is install them side by side and then use mod-rewrite to make example.com/blog go to the wordpress directory and anything else go to the drupal directory.
This way all existing content would stay at the existing URLs even though the drupal instalation had moved.

Note that even this solution would prevent anything which Drupal tried using the /blog path for from being visible, instead redirecting to WordPress.

坠似风落 2024-10-05 05:58:41

将 Drupal 和 Worpress 安装在一个目录中是不可能的。不仅因为 .htaccess 问题,还因为(可能)冲突的文件和库。而且:你的维护和升级将是地狱。

  • 我建议使用不同的虚拟主机。任何更专业的虚拟主机都允许您定义虚拟主机。定义它们取决于服务器、设置、操作系统的喜好等,并且它本身就是一个完整的主题。
  • 或者,您可以创建 /path/to/webroot/__cms__//path/to/webroot/__blog__/ 目录。建议您不要将 WordPress 放在 drupal(Drupal 目录中的 /blog 目录)下,也不要将 Drupal 放在 wordpress(WP 安装中的 /cms 目录)下。这会导致冲突。Drupal 可能会一个 url /blog(确实如此!)会发生冲突,而 wordpress 可能有一个 /cms url(它没有,但可能有)会发生冲突并排,而不是彼此内部。
  • 另一种选择是将一个 CMS 与另一个 CMS 桥接起来,这既困难又复杂,但如果您有足够的开发和配置时间以及经验,则可以将 WordPress 包含在 Drupal 中,反之亦然。

It will be impossible to install Drupal and Worpress in one directory. Not only because of .htaccess issues, but also because of (potentially) conflicting files and libraries. Moreover: your maintainance and upgrades will be come hell.

  • I would advice to use different virtual hosts. Any more professional webhoster allows you to define virtualhosts. Defining them depends on the server, setup, lfavour of OS and so forth, and is a whole topic on its own.
  • Alternatively, you could create a /path/to/webroot/__cms__/ and /path/to/webroot/__blog__/directory. Advice you to not put Wordpress under drupal (a /blog directory in the Drupal directory) nor to put Drupal under wordpress (a /cms directory inside your WP install. This will lead to conflicts. Drupal may have an url /blog (it does!) that will conflict and wordpress may have a /cms url (it doesn't, but could have) that will conflict. Side by side, not inside one another.
  • Another alternative would be to bridge one CMS with the other. This is tough and complex, but it would be possible to include wordpress in Drupal or vice-versa, given you have enough development and configuration time and -experience.
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文