I have to store quite a lot of images (lets say 1M) for serving from Nginx, so to avoid having too many files in one folder I'm planning to break them out into folders with names related to the file name, e.g.:
(I realise that there are methods to achieve more even distribution, but I think this will be adequate for our needs)
However, I'd like these to be accessible from a URL without the directory structure, ie:
Is this possible to accomplish in Nginx with e.g. URL rewriting?