Simple Machines Community Forum

Archived Boards and Threads... => Archived Boards => Install and Upgrade Help => Aiheen aloitti: littlejim84 - marraskuu 17, 2010, 04:48:59 AP

Otsikko: Forum is now on new domain, an easy way to update old links?
Kirjoitti: littlejim84 - marraskuu 17, 2010, 04:48:59 AP
Hello.

Last time I asked a question, this place was very very helpful. Hope you can help me again with an issue.

I'm still getting used to managing a Simple Machines forum. I have recently moved a large forum over to a new domain name. Everything has gone great and the forum has been running great for over two months... Only problem I'm having at the moment is the new forum location now has many, many threads in it that has links that point to the old forum domain.

I'm curious to know what the best way to sort this is? Running a MySQL query to search and replace? If so, where? ...some help on this would be VERY helpful for me as I don't want to run the wrong query in the wrong place and totally mess this up! ...Or, is there any sort of hidden option somewhere to change any old links in the threads to the new domain? (I know this is probably a long shot)

Some help or a query example or something would be great. Many thanks!
Otsikko: Re: Forum is now on new domain, an easy way to update old links?
Kirjoitti: sawz - marraskuu 18, 2010, 08:53:08 AP
a search and replace query will work, click SQL and run this:

UPDATE smf_messages SET body = replace(body,"old.com","new.com");
Otsikko: Re: Forum is now on new domain, an easy way to update old links?
Kirjoitti: JimM - joulukuu 04, 2010, 02:14:50 IP
Be sure and make a backup of the database before running any queries. 

If this is solved, please mark it solved by clicking the Mark Topic Solved link at the bottom left.