Well the template is right, focus on the define statement or your config file.


So you have that define statement in a file like:
includes/config_sites/www.mydomain.com_config.php

If so then I would start testing my config file to make sure it's being read properly.