I found it pretty easy to add other gimicks to the interpolation
in mod_vhost_alias. I to wanted to distribute vhosts thru MD5.
MD5, while possibly not the fastest sufficent thing, has the advantage
of being both in Apache and in Perl. I did something along these
lines: "/d3/vhosts/%h3.2/%h5.2/%0" which might map www.foo.com
to "/d3/vhosts/3e/af/www.foo.com". I.e. %h3.2 means grab two characters
out of the hex representation of the hash starting at the third
character. One tool I find useful is a perl script that emulates
this interpolation. - ben
|