同一域上的Wordpress和Drupal会导致htaccess冲突吗?
有一位客户想要将其 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(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.
将 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(它没有,但可能有)会发生冲突并排,而不是彼此内部。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.
/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.