PDA

View Full Version : Need change static URL in posts after move server


mixer66
08-03-2004, 12:10 PM
Hi,

Hope some1 can help us with the change of 660 static URL's in posts inside the mysql database after move from server and also change of the vbulletin root locatie. For example :

http://www.eurovan2.com/modules/vbulletin/upload/......... ( old situation )
http://www.eurovan2.com/forum/........... (new situation )

So exactly need a forumular to change /modules/vbulletin/upload/ to /forum/ inside the posts so all the old threads can be looked in on the new server. I hope some1 can help us out with this problem, because we'r not really sql guru's.

Many thanks

Xenon
08-03-2004, 12:19 PM
Actually very simple:

UPDATE post SET pagetext = REPLACE (pagetext, '/modules/vbulletin/upload', '/forum')

remember always do a backup before running such queries :)

Andreas
08-03-2004, 12:23 PM
UPDATE post SET pagetext = REPLACE(pagetext, 'http://www.eurovan2.com/modules/vbulletin/upload/', 'http://www.eurovan2.com/forum/')

You might also want to reset pre-parsed posts:
TRUNCATE post_parsed

mixer66
08-03-2004, 01:14 PM
Hi,


Many thanks for all help, this sql query worked perfectly many many thanks.
:up:

Xenon
08-03-2004, 05:27 PM
you're welcome Gerd :)

CarCdr
08-03-2004, 05:42 PM
I had to do this some time ago when we moved the site. I have never understood why the default behaviour is not to use special relative URL's for self-referencing links -- links to the current home URL. Self-referencing links would be stored relative, with a [homeurl] prefix (or whatever) and be expanded when the post is retrieved.

Natch
08-03-2004, 05:58 PM
Even more so I have wondered why post content is not parsed to see if it is local contact and if so to make links open in the same window, and to open in a new window if the content is heading offsite ...

CarCdr
08-03-2004, 06:15 PM
Bugs me too. The behavior you suggest is more like other forum software. (One exception I do not mind is attachment fetching.)