[opencms-dev] OpenCms static export
Yu Shao
yu.shao at spectracom.com
Tue Oct 29 22:39:02 CET 2002
This works now, thanks a lot for your kind help!
Yu
-----Original Message-----
From: Ulrich Rüth [mailto:ulrich.rueth at gmx.de]
Sent: Tuesday, October 29, 2002 11:57 AM
To: opencms-dev at www.opencms.org
Subject: Re: [opencms-dev] OpenCms static export
Hello Yu,
you probably need to change your url_prefix_export variable to your server
(root) directory. For example, on my box, the Apache DocumentRoot is set to
/srv/www/htdocs. Therefore, my staticexport.path is set to this:
staticexport.path=/srv/www/htdocs
The only other thing I modified is the url_prefix_export variable: I simply
left it empty:
url_prefix_export=
Like this, a document which had in OpenCms the URL
http://localhost:8080/opencms/opencms/pics/privat/bayerische_maenner.jpg
after export has the URL
http://localhost/pics/privat/bayerische_maenner.jpg
(which I can put to my external web hosting provider via FTP - take a look:
www.rueth.info).
The whole static parameter section looks like this:
staticexport.path=/srv/www/htdocs
url_prefix_export=
url_prefix_http=/${WEB_APP_NAME}/opencms
url_prefix_https=
url_prefix_servername=
If you need to set a different server name, use the url_prefix_servername
variable.
Hope this helps!
Regards,
Ulirch
Am Dienstag, 29. Oktober 2002 15:19 schrieb Yu Shao:
> Thanks for your quick response!
> But I've already tried to modify the setting and still not working.
> If I am right, here is all the things you can change for static export in
> the opencms.properties file. Can you give me an example of how to do it.
> Thanks again.
>
> ########################################################################
> staticexport.enabled=true
> staticexport.default.export=true
> staticexport.path=/www/kidscom/opencms/export/
> staticexport.start=/projects/
> url_prefix_export=/${WEB_APP_NAME}/export
> url_prefix_http=/${WEB_APP_NAME}/opencms
> url_prefix_https=
> url_prefix_servername=
> linkrules.true.export=exportrules
> linkrules.true.online=exportrules
> linkrules.true.offline=offlinerules
> linkrules.true.extern=externrules
> linkrules.dynamic.export=dynamic_exportrules
> linkrules.dynamic.online=dynamic_exportrules
> linkrules.dynamic.offline=dynamic_offlinerules
> linkrules.dynamic.extern=dynamic_externrules
>
> ruleset.offlinerules=s#^#${url_prefix_http}#
>
> ruleset.exportrules=*dynamicRules*, \
> s#^#${url_prefix_export}#
>
> ruleset.externrules=*dynamicRules*
>
> ruleset.dynamic_offlinerules=s#^#${url_prefix_http}#
> #ruleset.dynamic_exportrules=*dynamicRules*, \
> #s#(.*\.gif$)#${url_prefix_export}$1#, \
> #s#(.*\.jpg$)#${url_prefix_export}$1#, \
> #s#(.*\.pdf$)#${url_prefix_export}$1#, \
> #s#(.*\.css$)#${url_prefix_export}$1#, \
> #s#(.*\.doc$)#${url_prefix_export}$1#, \
> #s#(.*\.exe$)#${url_prefix_export}$1#, \
> #s#(.*\.xls$)#${url_prefix_export}$1#, \
> #s#(.*\.js$)#${url_prefix_export}$1#, \
> #s#(.*\.zip$)#${url_prefix_export}$1#, \
> #s#(.*\.jpeg$)#${url_prefix_export}$1#, \
> #s#(.*\.txt$)#${url_prefix_export}$1#, \
> #s#^#${url_prefix_http}#
>
> ruleset.dynamic_externrules=*dynamicRules*, \
> s#(.*\.gif$)#$1#, \
> s#(.*\.jpg$)#$1#, \
> s#(.*\.pdf$)#$1#, \
> s#(.*\.css$)#$1#, \
> s#(.*\.doc$)#$1#, \
> s#(.*\.exe$)#$1#, \
> s#(.*\.xls$)#$1#, \
> s#(.*\.js$)#$1#, \
> s#(.*\.zip$)#$1#, \
> s#(.*\.jpeg$)#$1#, \
> s#(.*\.txt$)#$1#, \
> s#.*##
>
> relativelinks_in_export=false
> ###########################################################################
>#
>
> Yu
>
> -----Original Message-----
> From: Ulrich Rüth [mailto:ulrich.rueth at gmx.de]
> Sent: Monday, October 28, 2002 6:35 PM
> To: opencms-dev at www.opencms.org
> Subject: Re: [opencms-dev] OpenCms static export
>
> > But I do have a problem to ask for your expertise.
> > We want use OpenCms as a content admin system, then export all pages
> > (static) under another webserver, say Apache, to serve the site. The
> > problem is when you do the export, all the images still point to OpenCms.
> > Is there any way to config the system or do some filteration on the fly
> > when you do the export so that the image src points to the image dir
> > under the webserver?
>
> You need to modify the settings in your opencms.properties file, section
>
> # Parameters for static export
>
> (everything is explained there).
More information about the opencms-dev
mailing list