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

XF 1.1 Import from vb4 - rewrite from root to /forums

#1
Hi all - import went off without a hitch.

My vb4 install was located in the root of the site. With XF, I'm looking to put it into /forums. Any tips on modifying the rewrite rules so I don't lose search engine rankings?

This is the rewrite rule that I generated thanks to Shadab's rewrite utility.

RewriteEngine on
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]


Do I just do this?
RewriteEngine on
RewriteRule [^/forums]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/forums]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]


Thanks for any help.
 

Jake Bunce

XenForo moderator
Staff member
#4
Hi all - import went off without a hitch.

My vb4 install was located in the root of the site. With XF, I'm looking to put it into /forums. Any tips on modifying the rewrite rules so I don't lose search engine rankings?

This is the rewrite rule that I generated thanks to Shadab's rewrite utility.

RewriteEngine on
RewriteRule [^/]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]


Do I just do this?
RewriteEngine on
RewriteRule [^/forums]+/([\d]+)-.+-([\d]+).html showthread.php?t=$1&page=$2 [NC,L]
RewriteRule [^/forums]+/([\d]+)-.+.html showthread.php?t=$1 [NC,L]


Thanks for any help.
That's correct. Put those rewrite rules into an .htaccess file in the web root. Then install Kier's redirect scripts into the web root:

http://xenforo.com/community/threads/redirection-scripts-for-vbulletin-3-x.5030/ (yes, these vB3 redirects work for vB4)

The rewrite rules forward the vBSEO URLs to the redirect scripts which then redirect to the new URL on your XF forum.

Kier's redirect scripts have a 301config.php file that you need to edit. There is a setting in there to specify the path to your XF forum. You need to enter that path since XF is in a different directory.