Nginx redirect from Drupal pages to XF threads?

Coop1979

Well-known member
Can any of you re-write wizards out there help me with something? I'm converting my board from Drupal+vB to just XF (with XenPorta as the "CMS"), but I need to properly forward my current news posts (Drupal) to the converted XF thread.

Our Drupal bridge to vB creates a thread every time a new article is posted in Drupal, so I am planning on manually copy/pasting those articles into the existing vB threads (into the OP). So basically I need help to do one the folowing:

Forward this link:

http://mysite.com/news/this-is-my-article-title

To either:

http://mysite.com/forums/news-forum/9999-this-is-my-article-title.html <-- current vB format of threads associated with Drupal articles

or directly to http://mysite.com/threads/this-is-my-article-title.9999 <-- future XF format

Any ideas?
 

Jake Bunce

XenForo moderator
Staff member
Try this:

Code:
location /news/ {
	rewrite ^/news/this-is-my-article-title$ /threads/this-is-my-article-title.9999 permanent;
}
You would have to add another rewrite line for each article since there are no ids to work with.
 

Coop1979

Well-known member
Hmmm... I do have Drupal node IDs to work with. I just don't think they correspond to the thread IDs at all.
 
Top