OK, that's much clearer on both the occlucion and the operation of the code.
I would like to point out that I posted
The easiest way to do it is to name your subdomain-subdirectories with a unique prefix, shown here as "sd_"
So, the method is dirt-simple, and works well on servers where the person installing the code is aware that it is there, and knows that all "/sd_" subdirectories are "special." It would not work well on a server shared among multiple users each with different subdomains, any of whom might unpredictably decide to name one of their subirectories /sd_<something> and then find it unreachable. So despite my usual attitude of "simple is good," I'll concede that it's certainly not bullet-proof. :)