https://gist.github.com/ethitter/fb901b9afe0b2cd64fa1ad607b5067ed
wpcom-vip-multisite-subdirectory-rewrites.php