• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

XF 1.2 vbseo redirects

Walter

Well-known member
#1
After solving many problems during an import I'm now stuck at the vbseo redirects. Maybe @Jake Bunce can recsue me :)

vb 4.2 with vbseo.
Apache.
IDs are the same in Xenforo as they were in vb but the forum moved to a subdirectory /forum

Threads old url:
HTML:
http://www.mydomain.com/subforumname/52487-threadname.html
Threads new url:
HTML:
http://www.mydomain.com/forum/threads/threadname.52487/
Forum old url:
HTML:
http://www.mydomain.com/subforumname/
Forum new url:
HTML:
http://www.mydomain.com/forum/forums/subforumname.290/
Reg. the forums: I obviously havent the old ID but I have a list of the old forum names...

Thanks a lot! I cant see the wood for the trees.
 

Jake Bunce

XenForo moderator
Staff member
#2
Add to top of .htaccess file in the web root:

Code:
RewriteEngine On

RewriteRule ^[^/]+/([0-9]+)-[^\.]+\.html$ /forum/threads/$1/ [R=301,L]
That will take care of threads.

For the forums without ids you need to add a rule for each individual forum. Example (adding to previous code):

Code:
RewriteEngine On

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

RewriteRule ^subforumname/$ /forum/forums/subforumname.290/ [R=301,L]
RewriteRule ^anothersubforum/$ /forum/forums/anothersubforum.150/ [R=301,L]