[opencms-dev] Exclude directory from VFS

Kai Widmann Widmann at mediaworx.de
Thu Nov 25 09:46:24 CET 2021


Hello there,

one of our customers has – for whatever reason – decided to add a blog to an OpenCms site that’s not run by OpenCms but by Typo3 running on a different machine/port. Using the fronting Webserver (Apache or Nginx) they then mapped the blog to a subdirectory of the OpenCms server – again for whatever reason. So the situation is now:


  *   OpenCms runs on https://www.sample.net/
  *   The Blog, powered by Typo 3, runs on https://www.sample.net/blog

No, they didn’t ask me in advance, if that might cause trouble ;)
Now the problem ist, that links from OpenCms pages to Blog articles are not possible with the usual OpenCmsVarLink fields. If you try to add an „external“ link to something below /blog, OpenCms thinks that there should be a VFS resource at this location in the VFS, but since there is not, an error is displayed in the editor's form.
Which leads to my question: is there any way to configure OpenCms to treat everything below /blog as external and not part of the VFS? Can specific folders be excluded from the VFS so that it’s possible to link to virtual resources outside of OpenCms.

If that’s possible, that’s the way I’d like to go, but if not I’ll use a workaround and tell the editors to use a different domain for the blog, so that links are treated like usual external links. Using a custom LinkSubstitutionHandler I’d revert the domain back to the normal domain when outputting the pages for the frontend. But that wouldn’t be my preferred solution, because editors would not be able to just copy the blog URL from their browser and I’m quite sure that it wouldn’t take long for the first editor to forget all about swapping the blog domain.

Any help is highly appreciated!

Kai

_______________________________________________

Kai Widmann
mediaworx berlin AG

+49 30 27580-262
Digitale Visitenkarte: https://mediaworx.com/021
www.mediaworx.com<http://www.mediaworx.com>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20211125/128940aa/attachment.htm>


More information about the opencms-dev mailing list