Code for the domain and directory?

DaveL

Well-known member
Hi,

Im creating a xenforo website on a spare domain with the intention of moving it over to a new domain when its complete.

Is there a way of using xencode so : http://www.mysite.co.uk/DCR/pages/OnAir__BarryBinns

will automatically point to which ever domain its on? http://www.newsite.co.uk/pages/OnAir__BarryBinns

Hope that makes sense!
 
Im creating a xenforo website on a spare domain with the intention of moving it over to a new domain when its complete.

If the two sites are on the same server then you can probably just copy over the XenForo files to the main site when you are done. Use the same database and library/config.php file. Change the Board URL appropriately:

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

If they are on separate servers then you need to make a full backup on the old server and restore it on the new one:

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

Thanks for your reply. Im going to be moving the site onto a different server.

The problem im facing and which im hoping theres an easy eay to solve it will be for regarding links/images.

Ive currently got the site on domain mysite.co.uk, so images will be mysite.co.uk/images/picture.jpg

Im creating an awful lot of pages with links/images. When I move it to the new server, is there code I can start using so I wont have to go through every page replacing mysite.co.uk with newsite.co.uk
 
Why not just do a replace in the SQL database post table - old URL for new URL?

That's what I did when I migrated from phpBB due to a lot of old links being incorrect.
 
Hi Brogan,
That sounds very interesting. Im gussing it just a case of running an SQL query in phpMyAdmin?

If thats correct, I dont suppose you have an example of the query you used at all?

I dont want to have to start making notes of where I need to start changing the URLs when I move the site over!
 
Yes, just run the query from phpMyAdmin.

This is what I used:
Code:
UPDATE xf_post SET message = REPLACE(message, 'old_path', 'new_path');

Take a backup first though, or test it on your localhost, just in case...
 
Thanks Brogan, Just to be on the safe side, Does 'oldpath' mean http://www.mysite.co.uk/DCR or www/mysite.co.uk./DCR?

Pending on the answer of this, I think ive got one more question! Really appreciate your help though - Can see why your the fountain of Xenforo knowledge!
 
You only need to enter as much of the string as required to get a positive match.

So you could just enter domain.co.uk (or even just the domain name), omitting the http amd/or www.
 
Brillaint, Thanks Brogan.

So by doing that mysite.co.uk/DCR becomes newsite.co.uk/DCR

Would I be best of moving the forum to the root so its not in the DCR folder, or would
UPDATE xf_post SET message = REPLACE(message, 'mysite.co.uk/DCR', 'newsite.co.uk');

Do the job?
 
Whether to install the forum in the root or a sub-directory is a personal choice so I wouldn't like to say :D

It really depends whether you ever intend to have anything else in the root, which may have an index.php for example.
 
Top Bottom