Answer the question
In order to leave comments, you need to log in
How to make it so that instead of a directory an archive is given?
There is, for example, a folder on the server: http://server/path1/path2/path3
. Depth is not fixed. How can I make a request like the one above open the folder as usual, or the page if there is one to open. And when requesting a view, the http://server/path1/path2/path3.zip
path3 folder was archived and given for download. nginx server. Thank you.
Answer the question
In order to leave comments, you need to log in
make a pre-archive, put it in another place and set up routing. The reason is simple - the creation of an archive is not very predictable in time and, therefore, it is better not to rely on generation on the fly. If this is not important for the task, then mod_zip
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question