AW: [opencms-dev] Changing a Sites Hostname
Andreas Schouten
Andreas.Schouten at framfab.de
Tue Feb 20 09:32:14 CET 2001
Hi,
the best way is to use the following template-method:
<method name="getServletPath"/>
this method returns always the correct path eg:
http://www.mysite.com/servlets/opencms/ .
Yes, the page-editor should insert that.
Regards,
Andreas Schouten
-----Ursprüngliche Nachricht-----
Von: Simon Wilks [mailto:simon.wilks at silion.ch]
Gesendet: Dienstag, 20. Februar 2001 09:33
An: opencms-dev at opencms.com
Betreff: [opencms-dev] Changing a Sites Hostname
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