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

XF 1.2 New domain redirection query

#1
Hello,

I am going to change the domain for an existing forum but the problem is that on the existing domain I previously had vbulletin with vbseo which I converted to xenforo some time back so I have redirections in place for vbseo urls.

Now I am thinking about changing the domain to a new one and would like all the old vbseo urls redirected to the new domain as well as the existing xenforo urls all to the correct respective pages. I am not sure how this could be done.

I hope some one could suggest the best ways for doing this.
 

Adam Howard

Well-known member
#2
vbseo for old domain to point to new domain. Well that part is easy, since vbseo re-writes are none domain pacific. It is only the string that is redirected.

XenForo re-writes also none domain pacific. It is only the string that is redirected.

This should not be a problem. Simple keep your rewites and move your site to your new host.
 

Adam Howard

Well-known member
#3
Hello,

I am going to change the domain for an existing forum but the problem is that on the existing domain I previously had vbulletin with vbseo which I converted to xenforo some time back so I have redirections in place for vbseo urls.

Now I am thinking about changing the domain to a new one and would like all the old vbseo urls redirected to the new domain as well as the existing xenforo urls all to the correct respective pages. I am not sure how this could be done.

I hope some one could suggest the best ways for doing this.
Just remember to change your domain name / paths in AdminCP. I know that goes without saying, but most people forget about that.

admin.php?options/list/basicBoard

For good measure though you can do 2 extra things

Add this into your htaccess
PHP:
RewriteCond %{HTTP_HOST} XXX\.com
RewriteRule ^(.*) http://www.YYY.com/$1 [L,R=301]
X is your new domain name
Y is your old domain name

If it's not a .com domain name, just replace those .com's with whatever domain name extension you're using

Now for bonus... Someone told me this helps. I'm unsure if it does. You can try it out if you want.

First, backup your database
Run this command ins SQL
PHP:
UPDATE xf_post SET message = REPLACE(message,'OLD-SITE','NEW-SITE');
This will replace any post that maybe you or a member had made that pointed to your old domain name. You want to keep it simple. Don't worry about adding http:// or www just the domain it's self will be good enough.
 
Last edited:
#4
Thanks for the replies Adam.

I am taking backups right now and will try to get this done as soon as the backups are in place. I am going to try doing this the WHM way by just modifying account and will put in the new domain name in there and then change the domain in xenforo admin panel. For the old domain I will create a new cpanel and throw in a .htaccess file with 301 redirects.

Is this how I am supposed to do it or am I missing something here?
 
#5
I have done it the way I mentioned above and it works. I just had to change the url in the .htaccess file and have 301 redirect in place on old domain. No moving around data bases or anything. Took me 5 mins flat.

Thanks for your help Adam.