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

Looking to move XF site from subdomain to root...

Alien

Well-known member
#1
I'm going to be moving an XF site from a subdomain (forums.sitename.com which is /forums off root dir) to simply sitename.com root under no sub. It was formally a vB 4.x site, so the vb4 redir scripts are still assisting.

What are my best steps forward?
 

Brogan

XenForo moderator
Staff member
#2
Very simple, as the FAQ explains.

How can I move my installation to a different directory?
Update the Board URL in the ACP -> Options -> Basic Board Information and move the files to the new directory (or rename the directory). You may need to restart the server for the change to take effect.
Note that redirection will be required to ensure any existing links continue to work.

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-180455
 

Alien

Well-known member
#3
Very simple, as the FAQ explains.

How can I move my installation to a different directory?
Update the Board URL in the ACP -> Options -> Basic Board Information and move the files to the new directory (or rename the directory). You may need to restart the server for the change to take effect.
Note that redirection will be required to ensure any existing links continue to work.

http://xenforo.com/community/threads/frequently-asked-questions.5183/#post-180455
This is what confuses me a bit.

So I keep the vb4 redir scripts in the new root dir with the rest of my xf files, but is there something special I need to do with .htaccess to assist Googlebot at all?
 

Brogan

XenForo moderator
Staff member
#4
Well the problem you will have now is indexed content from your original vB installation and now your XenForo installation so you will need two lots of redirects, assuming you don't want any dead links.

One for vB to the new XenForo URLs and one for the old XenForo URLs to the new XenForo URLs.
Both should be simple enough to set up.

This for example is the redirect I have in .htaccess after moving my installation from /community to the root.
Code:
RewriteRule ^community$ / [R=301,L]
 

Alien

Well-known member
#5
Well the problem you will have now is indexed content from your original vB installation and now your XenForo installation so you will need two lots of redirects, assuming you don't want any dead links.

One for vB to the new XenForo URLs and one for the old XenForo URLs to the new XenForo URLs.
Both should be simple enough to set up.

This for example is the redirect I have in .htaccess after moving my installation from /community to the root.
Code:
RewriteRule ^community$ / [R=301,L]
So if I use the added "L", would that code need to be added then to the bottom of the htaccess file?
 

Alien

Well-known member
#7
OK, I was used to seeing the "L" added after the perm 301 redirect usually at the bottom in other instances to help prevent loops and such. I thought it prevented apache from processing further rules. After some research it appears it is more used to just close a "block" of rules.

So mine would be:

Code:
RewriteRule ^forums$ / [R=301,L]

Lastly, it would appear that Google doesn't even have any of our pages with *showthread* in them (we used to use full friendly urls a few years ago). Kind of tempting to ditch the additional vb4 redir files, though I suppose they still do help with internal linked pages (and are friendlier than just getting an error and forcing a person to search). Probably best to keep 'em.
 

Brogan

XenForo moderator
Staff member
#8
It's entirely possible that Google has reindexed now but as you say, the redirects may still be required for links in posts on your own and other sites.
 

Alien

Well-known member
#9
It's entirely possible that Google has reindexed now but as you say, the redirects may still be required for links in posts on your own and other sites.
Yeah, going through the listings for the site shows showthread.php only in a small handful of sites that aren't even search engines. I do have internal stuff though, so it doesn't hurt anything and I'll keep 'em!

Thank you so much (as always) for your timely patience and support, Brogan!

This should go pretty smoothly (famous last words). (y)