[opencms-dev] Changing a Sites Hostname

Simon Wilks simon.wilks at silion.ch
Tue Feb 20 09:32:45 CET 2001


Hi,

I was wondering how I go about handling the change of a site's base url with
OpenCms. The problem is that when I place an image into a page using the
DHTML Editor, the link is always automatically converted to the entire url,
ie: http://localhost/opencms/pics/image.gif . When the base URL of the site
changes from say http://localhost to http://www.mysite.com all of those
pages with images in them need updating.

I see only two options at the moment:

1) Write a small program that will scan through the HTML in the cms_???
(forgotten already) table and do a search replace; or
2) Export the site, unzip it, do a text based search replace with an
apropriate tool, rezip and import.

Mmmm. Is there a better way? Is there any way of forcing the system to store
relative URLs instead of the entire site URL?

If anyone already has a java program to do 1) above I'd love a copy.

Simon Wilks
Software Engineer
simon.wilks at silion.ch
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
silion (switzerland) ag    software engineering
spinnereistrasse 8              9008 st. gallen
tel 0878 80 90 60             fax 0878 80 90 30
info at silion.ch                    www.silion.ch

a member of the Penta Group   www.pentagroup.ch





More information about the opencms-dev mailing list