2010-11-30, 10:32 AM
Hello,
recently I moved my forum from http://forums.domain1.com to http://forums.domain2.com. Everything works fine, except for a thing: internal thread links are broken.
Users like to link between threads. For example in the thread http://forums.domain1.com/thread-82342.html is a link to the thread http://forums.domain1.com/thread-82547.h...ght=update.
Those thread links are no relative, but absoulte links. But this is a problem because after I moved my forum from forums.domain1.com to forums.domain2.com the thread links stay the same and still link to the old domain, which obviously reports a 404 error.
How can I update my database to fix broken links? Two days ago I found a site where another user posted a mysql query from MattRogowski to deal with this problem. But I can't find the link to the page anymore. It was some 'UPDATE ... SET VALUES ... WHERE ...' code, where string matching is used to find and update thread links pointing to the old domain.
recently I moved my forum from http://forums.domain1.com to http://forums.domain2.com. Everything works fine, except for a thing: internal thread links are broken.
Users like to link between threads. For example in the thread http://forums.domain1.com/thread-82342.html is a link to the thread http://forums.domain1.com/thread-82547.h...ght=update.
Those thread links are no relative, but absoulte links. But this is a problem because after I moved my forum from forums.domain1.com to forums.domain2.com the thread links stay the same and still link to the old domain, which obviously reports a 404 error.
How can I update my database to fix broken links? Two days ago I found a site where another user posted a mysql query from MattRogowski to deal with this problem. But I can't find the link to the page anymore. It was some 'UPDATE ... SET VALUES ... WHERE ...' code, where string matching is used to find and update thread links pointing to the old domain.