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

Redirect and/or .htaccess help needed

I am about to change from vB 3.8 to XF and would also like to change the path to the forum. Apologies in advance as much of this is very new to me.

Currently I have www.domain.org and forum.domain.org the forum.domain.org has it's own dns entries etc which I setup through cpanel and/or whm They are stored in different directories on the server, i.e. the forum is not a subdirectory of the website.

What I want to do is to have the forum in a subdirectory called community so from the website the url would be www.domain.org/community/

The current forum has over 17,000 threads and over 188,000 posts many of which have links in to existing posts or threads. So for example http://forum.domain.org/showthread.php?p=201116#post201116

I don't particularly want to run an update query on the Db, though I could (I am quite good at SQL fortunately - even if I do say so myself!) as this would only work for internal links - I know that a number of the threads are linked externally on other forums and I would like to preserve that access path. I am also unsure as to what effect if any it would have on SEO.

Is there something that can be done in the .htaccess file, and if so can someone help me with the syntax and also where to place the .htaccess file (I believe it normally goes in the root, i.e. public_http). Would I also need a redirect in the existing forum.domain.org root?

I am trying to minimise downtime as we have already had more than enough recently due to some stupidity by the previous admin. I accept that the db import etc will take time but that would ideally be all the downtime I would like.

Many thanks in advance.

Jake Bunce

XenForo moderator
Staff member
Download these redirect scripts:


Upload them to the old vB directory.

Edit the 301config.php file and specify the path to the new XF directory.

That's it. The redirect scripts will connect to the XF database and use the import log to map the old ids to the new ones. It will also handle the change of directory when it redirects. No .htaccess stuff is needed since you aren't using rewrites for your URLs (no vBSEO).

Once the redirects are in place Google will update its links eventually. It can take a few weeks.