Apache mod_rewrite for moved directories and folders
Recently, a client contracted with a technical data provider. This data is hosted on the provider's servers who integrated our Plone theme as the basis of the design on their hosted site. Unfortunately, the design was hard linked to the temporary merged CSS & JS files hosted on the Plone site. When these files updated they would get a new name, and in the process break the data provider's site design.
To solve this problem on our end (yes, it should be resolved at the source ... ) I created a frozen version of the merged files and placed them in a Zope folder.
The external site was still linking to files in the wrong place, so I created an Apache rewrite rule which came to the rescue. An example of the URL which needed conversion:
Was then translated to this:
Using this Apache Rewrite rule: