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

Switching domains, need help...

Discussion in 'Installation, Upgrade, and Import Support' started by JABRONI, Oct 26, 2011.

  1. JABRONI

    JABRONI Well-Known Member

    How do I transfer all my Xenforo forum to my new domain?

    Do I just copy over the Xenforo sub folder to the new directory and import the SQL into a new database or is there a different way to do this?
     
  2. kkm323

    kkm323 Well-Known Member

    yes, also don't forget to change the config.php file if needed. The main thing you should remember to write redirect lines in .htaccess file so you don't loss traffic.

    if i can remember this is the code line i used to redirect my vb forum from site.com/vb directory to the home directory
    Code:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^vb/(.*)$ /$1 [R=301,NC,L]
    so you probably need to add this instead
    RewriteRule ^vb/(.*)$ newdomain.com/$1 [R=301,NC,L]
    -----------------------------------------------------------------------------------------------------------
    since I used so many methods of different url in the sh**y software call vb
    so i had all this codes in my htaccess

    Code:
    RewriteRule vb/forum.php http://www.newdomain.com/index.php [L,R=301]
    RewriteRule vb/private.php http://www.newdomain.com/conversations [L,R=301]
    RewriteRule vb/t([0-9]+) http://www.newdomain.com/showthread.php?t=$1 [L,R=301]
    RewriteRule vb/users/([0-9]+) http://www.newdomain.com/member.php?u=$1 [L,R=301]
     
  3. JABRONI

    JABRONI Well-Known Member

    How do I write redirect lines? I really don't want to **** this up :/
     
  4. infis

    infis Well-Known Member

  5. kkm323

    kkm323 Well-Known Member

    i added the code to my previous post
     
  6. JABRONI

    JABRONI Well-Known Member

    Code:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^forums/(.*)$ bfghq.com/$1 [R=301,NC,L]
    so that's what my htaccess needs?
     
  7. kkm323

    kkm323 Well-Known Member

    Yes, .htaccess file is tricky and can be very useful. The .htaccess file need to be placed in the root of the old domain.
    If you need any other help just ask and I would gladly help you.
     
  8. kkm323

    kkm323 Well-Known Member

  9. JABRONI

    JABRONI Well-Known Member

    Should that code redirect my users to the new site?

    because apparently it isn't :/

    Sorry, I'm not too savvy on this.
     
  10. kkm323

    kkm323 Well-Known Member

    it should redirect all urls to the new site. Can I see your site ...
     
  11. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    If the two sites are on separate servers then you need to do a full move which is a backup + restore from the old server to the new one:

    http://xenforo.com/community/threads/how-to-backup-and-restore-your-forum.7213/

    If they are on the same server then you don't need to do a full server move. Just copy the forum files to the new domain and leave the library/config.php file pointing to the same database. Then update the board URL in the Admin CP:

    Admin CP -> Home -> Options -> Basic Board Information -> Board URL

    In either case you will probably want to redirect old traffic to the new URL which is what kkm323 is talking about.
     

Share This Page