XF 2.0 Rewrite Rules for VB4 with DBSEO after XF 2 Conversion

invictus

Active member
Moved a vBulletin 4 forum to XF 1.5 then upgraded to XF 2.0 beta 5.

I could use some help with rewrite rules to 301 the old URLs, especially the forums and categories if possible.

This was a clean XF install and uses the same content ID's from VB database.

Example URL's:

Code:
Old Forum Home:
https://www.x.com/forum/
New XF Forum Home:
https://www.x.com/forum/

Old Category:
https://www.x.com/forum/category-name/
New XF Category:
https://www.x.com/forum/#category-name.6

Old Forum:
https://www.x.com/forum/forum-name/
New XF Forum:
https://www.x.com/forum/forums/forum-name.74/

Old Thread:
https://www.x.com/forum/forum-name/62649-thread-name.html
New XF Thread:
https://www.x.com/forum/threads/thread-name.62649/

Old Multi Page Thread:
https://www.x.com/forum/froum-name/62417-thread-name-2.html
New XF Multi Page Thread:
https://www.x.com/forum/threads/thread-name.62417/page-2

Old User:
https://www.x.com/forum/members/admin.html
New XF User
https://www.x.com/forum/members/admin.1/
 
Last edited:
Thanks. Example from that link does not work for me. I've tried many of the examples given to others in various threads but can't seem to get any of them to work on my forum.

I tried with and without the comment on line 'RewriteBase /forum' but get the same result.

Code:
This rule:
RewriteRule ^[^/]+/([0-9]+)-[^\./]+\.html$ /threads/$1/ [R=301,L]
Redirects the following link:
https://www.x.com/forum/forum-name/61900-thread-name.html
to:
https://www.x.com/home/user/public_html/forum/forum/threads/61900/
Correct URL should be:
https://www.x.com/forum/threads/thread-name.61900/

Any ideas @Jake Bunce ?
 
Update.

I got non-paginated thread redirect working by hard coding the full URL into the redirect like this:

Code:
RewriteRule ^[^/]+/([0-9]+)-[^\./]+\.html$ https://www.x.com/forum/threads/$1/ [R=301,L]

I don't know why that was required, but my server seemed to break anything else.

However I am not having any luck getting redirects for paginated threads and individual posts. Still looking for a solution on those.

Individual post format:

Code:
Old VB4: https://www.x.com/forum/forum-name/62606-thread-name-post1533759139.html#post1533759139
New XF: https://www.x.com/forum/threads/thread-name.62606/post-1533759139
 
Last edited:
Got threads, paginated threads and posts working with the following in case anyone else has a similar setup:

Code:
    # Make Exception for XF's thread urls to avoid conflicts
    RewriteRule ^threads/[^\./]+\.[0-9]+/ - [S=2]
    
    # Redirect VB Single Posts
    RewriteRule    ^[^/]+/([0-9]+)-(.+)-post([0-9]+)\.html$ /forum/threads/$2.$1/post-$3 [L,R=301]   
    
    # Redirect VB Paginated Threads
    RewriteRule    ^[^/]+/([0-9]+)-(.+)-([0-9]+)\.html$ /forum/threads/$2.$1/page-$3 [L,R=301]
        
    # Redirect VB Threads
    RewriteRule ^[^/]+/([0-9]+)-[^\./]+\.html$ /forum/threads/$1/ [R=301,L]
 
Back
Top Bottom