开发者

Does anyone have experience simultaneously running a Drupal and Wordpress site and redirecting some links from Drupal to Wordpress

开发者 https://www.devze.com 2022-12-26 21:46 出处:网络
This is a really weird question and I apologize: I\'ve been asked if it\'s possible not to import our blog from Wordpress to Drupal but just keep it in Wordpress as an archive and re-dir开发者_开发技

This is a really weird question and I apologize:

I've been asked if it's possible not to import our blog from Wordpress to Drupal but just keep it in Wordpress as an archive and re-dir开发者_开发技巧ect our users say from hostname/blog/... to hostname/wordpress/... when a URL matches the Wordpress URL pattern.

I've never heard of anyone trying this and I'm wondering about pitfalls and whether or not it's even possible.

Thanks!

D


This looks like it should be pretty simple to do. I plan to take advantage of the mod_rewrite module for apache:

We will just need to configure a .htaccess file to redirect URLs matching hostname/blog/pattern/ - where pattern fits a Wordpress URL blog pattern.


I use mod_rewrite on my Drupal site. Here's an example I use to redirect users to www.earldouglas.com when they access earldouglas.com:

RewriteCond %{HTTP_HOST} ^earldouglas.com [NC]
RewriteRule ^(.*)$ http://www.earldouglas.com/$1 [L,R=301]

You could try something like the following:

RewriteCond %{REQUEST_URI} /blog
RewriteRule ^(.*)$ /wordpress [L,QSA]
0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号