This document outlines the simple changes needed to migrate from the old download mirror system to the new one:
Change this to `www.apache.org/dyn/closer.lua`!
Great: you probably don't need to do anything! But check that the script works OK to make sure.
Note: the system relies on finding the .html file in the same directory as the .cgi file.
If your site uses redirects, that may break the linkage.
See below for details that may affect how the page displays.
You may need to make changes, as all `.cgi` files are now being internally rewritten.
The redirect of the `.cgi` file occurs before the `.htaccess` file is processed so the mirror system won't see any redirects applied by your `.htaccess` file to the `.cgi` file.
You can fix this by updating the links to .cgi files to point to the same parent directory as the redirected `.html` file.
The `.cgi` file does not actually have to be present at the target location.
However fixing ASF website pages won't fix existing links which may appear on 3rd party sites. The only way to fix these is to ensure that the HTML file is accessible at the same (un-redirected) URL as the `.cgi` file.
If the HTML redirect is to another directory in the same site, then a simple file link should suffice.
Alternatively you can create an HTML file in the original location; with a meta-redirect to the redirected location of the `.cgi` file (not the HTML file). The meta-redirect will be processed and the `.cgi` reference will again be intercepted; this time it is in the correct location.
For example, `commons.apache.org/lang/` currently redirects to `commons/proper/commons-lang/`
This means that references to `/lang/download\_lang.cgi` no longer work properly.
Create a link from `../proper/commons-lang/download\_lang.html` to `lang/download\_lang.html`
Create the file `lang/download\_lang.html` with the content
<meta http-equiv="refresh" content="0; url=/proper/commons-lang/download_lang.cgi" />
If the .htaccess redirects change later, any such fixes may have to be updated.
You may want to adopt closer.lua or simply have an EZT template (see this Tomcat example or its source ) called `download.html` and then point to `download.cgi` to have our new system use your template via internal rewrites.
Please have a static EZT template (see example above) called `download.html` (or equivalent) and refer to it as `download.cgi` to have our mirror system pick up the template and use it. You can also call it `download-foo.html` and refer to it as `download-foo.cgi` to have it rendered via our mirror system.
This won't work any more. Please use a static html template (see above).
Contact us at firstname.lastname@example.org or through Slack.