After changing the server URL, links to threads in old posts are no longer active as the reference the old server URL. Is there a utility to update all links to the new URL? The database is on SQL Server.
Lets say that instead of http://www.phpbb.com, the server was changed to forum.phpbb.com. Finding and changing the first occurrence in each row is easy using UPDATETEXT. The big problem comes when a row contains multiple occurences of the text being searched for.
For example, the link above to this thread occurs twice in the database row--once for the link and once for the text being displayed. Some posts may have several such links in a single data row.
I can run my update script repeatedly to get the next occurence of the string, but I have no idea of how many times to run it. With arount 50,000 total posts, this could get to be very time comsuming.
Last edited by stevemaury on Fri Dec 05, 2008 3:47 pm, edited 1 time in total.
Reason:Make URLs not parse so discussion is clearer.
UPDATE phpbb_posts SET post_text = replace(post_text, 'www.phpbb.com', 'forum.phpbb.com');
If your table prefix is not phpbb_, change accordingly. I also strongly suggest you disable the board and backup the posts_text table before running this query.
For REALLY good and VERY inexpensive hosting CLICK HERE
I can stop all your spam. I can upgrade or update your Board. PM or email me. (Paid support)