motorhaven - 1:55 am on Jul 4, 2012 (gmt 0)
A web site I purchased has user uploads, and unfortunately they are not well organized for server speed. All 150,000 images are in same directory (Linux box). Naturally this adds substantial overhead to each image fetch.
What I want to do is make 100 sub-directories in the forum:
and so on.
All the files have a number in the first two digits of the filename. So I would place the files in the appropriate sub-directory using the first 2 digits, and then use a rewriterule so Apache can find it. I've banged my head against the wall trying to get rewriterules working.
11ABCEFG.jpg would be rewritten to:
94SJRDHEID.jpg would be rewritten to:
It should be simple, I've done a lot of work with mod-rewrite but this one is eluding me!