Update functions.php

WordPress Network compatibility. Fixed .htaccess rules to correctly serve cached files by domain.