How NetStorage serves content from archives
When serving from an archive file, NetStorage treats it as a directory within the hierarchy of your NetStorage content.
Below are some example scenarios.
Example 1: One instance of a target file exists
You might upload an archive file to the following directory in NetStorage:
If an EdgeServer then sends an end user request for
name>.download.akamai.com/<cp_code>/a/b/c/d/e.html, the following will
- NetStorage begins by looking for the full path.
- If the file is not found, it begins searching backward up the path:
- If the file is not found there, it will look for the following:
- Finding that file, NetStorage looks inside the archive’s index for
/d/e.html, which it retrieves and serves to the end user.
Example 2: Two Zip files exist along the requested path
Using the same scenario in the example above, let's assume there are two zip files along the same path.
If an end user requests
.../cp_code/a/b/c/d/e.html , the
- NetStorage limits its search to the
archive furthest along a given path.
So, in this case NetStorage searches
c.zip, because it's found first. As a result, either of the following occur:
c.zipcontains a file named
/d/e.html, that file is served.
c.zipdoes not contain the file, a 302 error is returned, even if a
b.ziparchive exists, and it actually contains the file,
Ensure that you take into account when structuring your content.
You can override files inside an archive file
To do so, you need to upload them individually, external to the archive. Keep in mind, however, that the upload path must match that of the file in the archive. For example, let's assume you have the following archive:
If that archive contains the file,
d/e.html, then the overriding file
must be uploaded to: