Log in

View Full Version : Need some mysql help change /showthread.php to forums/showthread.php


m4ck
04-15-2006, 12:06 AM
Ok I use to run VB 3.0.0 I upgraded to 3.5.4 and when I did I moved my forum to the /forums directory. Main reason was because I installed vbadvanced to have a nice clean front page. Because the forums were originally in the main /html folder and are now in the /forums folder all the links people have posted in the forums to other places in the forums are broken. For instance www.mysite.com/showthread.php?t=472 should now be www.mysite.com/forums/showthread.php?t=472
I am sure there is a way for me to run an sql query that will replace all instances of www.mysite.com/showthread.php with www.mysite.com/forums/showthread.php this would fix all my broken links. I could manually do it but dont want to have to change like 400 posts manually.
Any help would be wonderfull.
THanks
M4ck

SaN-DeeP
04-15-2006, 12:30 AM
to replace text in posts.
UPDATE post SET pagetext = REPLACE(pagetext,'www.olddomain.com','www.olddomai n.com/forums')

replace text in pms.
UPDATE pmtext SET message = REPLACE(message,'www.olddomain.com','www.olddomain .com/forums')

to replace text in signatures.
UPDATE usertextfield SET signature = REPLACE(signature,'www.olddomain.com','www.olddoma in.com/forums')

you can acheive what you want from above queries :)
kindly test the same once... as I am not sure if your board url is using a trailing slash /

m4ck
04-15-2006, 12:58 AM
Hey man I really appreciate that. Very quick response too. I thought I would have to wait a while. Great support here.
M4ck