Adding auto header & footers to my subdomains

hi everybody.

i'm planning to do some kind of a freehost, giving others a subdomain with ftp access.
everything's set up so far, the only thing i can't figure out is, how can i add automatically headers and footers to those subdomains?
i have tested a php script combined with htaccess, this works for subdirectories, but not for subdomains (guess the relative path is different when opening sub.domain.com instead of domain.com/sub).

could anybody help me on that?
thanks in advance Adding auto header & footers to my subdomains

 

 

 

 

Top