XF 1.5 VB4 DragonByte SEO to XenForo URL rewrite rules

Cyberclaw

Active member
Hello,

I'm in the final stages of converting my vBulletin 4 forum to XenForo 1.5. The vb installation previously used VBSEO before it vanished, and now it uses DragonByte SEO (otherwise known as DBSEO).

I can use assistance in redirecting the old URLs to the new XenForo URLs. Here are some examples:

Old DBSEO URL structure

Forums home: domain.com/forums/

Example forum: domain.com/forums/publishing/

Example thread: domain.com/forums/publishing/18402-finding-publisher.html


New XenForo URL structure

Forums home: domain.com/community/

Example forum: domain.com/community/forums/publishing.17/

Example thread: domain.com/community/threads/finding-a-publisher.18402/


A few important points / questions:

  • As shown in the examples above, the new forum is in a directory called "community." The old forum was in "forums."
  • The new XenForo installation is using "full friendly URLs." Does that impact the rewrite rules?
  • Do I need to upload special scripts to make this work? Or can it be done entirely through the .htaccess file?
  • Given that the old and new forums are in different directories, where would I place the .htaccess file with the redirects?

Also, I don't want to be pushy, but I heard that @Jake Bunce is the grandmaster of URL redirects. Any help is appreciated. Thanks.
 
The ids are the same so it can be pure htaccess.

Add these rules to the top of the .htaccess file in your /forums directory:

Code:
RewriteEngine On

RewriteRule ^[^/]+/([0-9]+)-[^\./]+\.html$ /community/threads/$1/ [R=301,L]

Or you may want to explicitly define what I assume are forum names in your old URLs in order to avoid possible incorrect redirects if other "routes" in the old URL system use the same format as threads:

Rich (BB code):
RewriteEngine On

RewriteRule ^(publishing|category2|category3|etc)/([0-9]+)-[^\./]+\.html$ /community/threads/$1/ [R=301,L]

If the /forums directory no longer exists then you can use these rules in the web root instead:

Rich (BB code):
RewriteEngine On

RewriteRule ^forums/[^/]+/([0-9]+)-[^\./]+\.html$ /community/threads/$1/ [R=301,L]

...or again with the optional list of forum names:

Rich (BB code):
RewriteEngine On

RewriteRule ^forums/(publishing|category2|category3|etc)/([0-9]+)-[^\./]+\.html$ /community/threads/$1/ [R=301,L]
 
Back
Top Bottom