[opencms-dev] How can we static export without links being changed?

John Weible jweible at uiuc.edu
Thu Feb 14 23:34:09 CET 2008


Amit,

Thanks for this tip.  It is ALMOST exactly what I wanted, and it is 
helpful.  It may be the best we can do, but I'm hoping there's more.

This had the effect of removing the "/sites/default/" from the filenames 
but it still puts "/export" in the front of all the URLs.  The ideal end 
result is to have the files exported to the export directory as they are 
now, but without the links inside the files having "/export" at the front.

Thanks again for your help,

- John Weible

Chauhan, Amit wrote:
> John,
> Right click on your site folder, and click on properties -> Advanced.
> Set "/" against property "exportname", and publish out your files again.
> The urls will not be something like src="/image1.jpg" etc. 
>
> Thanks
> Amit Chauhan
>
> -----Original Message-----
> From: opencms-dev-bounces at opencms.org
> [mailto:opencms-dev-bounces at opencms.org] On Behalf Of John Weible
> Sent: Thursday, February 14, 2008 9:18 AM
> To: The OpenCms mailing list
> Subject: [opencms-dev] How can we static export without links being
> changed?
>
> I have a question about the simplest way to disable the link rewriting 
> that happens by default when pages are static exported.  (We're running 
> version 7.0.1 about to upgrade to 7.0.3.)
>
> Our OpenCms system is one of several back-end servers we run behind an 
> Apache 2.2 reverse proxy server using mod_proxy.  We configured our 
> Apache proxy to serve most CMS-hosted content from the 
> .../export/sites/default/... directories, so that users don't hit the 
> dynamic versions of the pages at all, and our users only see the nice 
> short clean URLs we want them to see.
>
> The annoying problem is that when pages are static exported, the 
> internal links in them get rewritten with a prefix of 
> "/export/sites/default/".  I understand why this is normally a necessary
>
> thing.  But clearly in an environment where OpenCms is being reverse 
> proxied, this is not a benefit.  So how do we modify the export process 
> to leave those links alone when writing the files?
>
> I took a quick look at the source code and didn't see an easy fix, but 
> there are so many nested classes and method calls being used I may just 
> not see the easy fix.  I also didn't notice any directive to change this
>
> behavior in the opencms-importexport.xml file.
>
> Thanks!
>
>   



More information about the opencms-dev mailing list