subdomains

I'm having trouble getting Elgg to work with my subdomain. If I set the site URL to the full URL to the installation then the system works fine, but if i shorten the URL by using a subdomain then it breaks out of the subdomain and tries to go to the subdomain plus the rest of the directory structure:

 

INSTALLED AT: subdomain.domain.com/

subdomain.domain.com points to the directory: www.domain.com/site/community/

setting the site URL to: subdomain.domain.com

causes Elgg to point to: subdomain.domain.com/site/community

 

Does anyone have some advice that could get be back on track?