开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜