for example, i have mysite.com and beta.mysite.com. both point to the same index file using the virtualHost directive. what will i do in the apache conf so that when i access the $_SERVER['SERVER_NAME'], the value would still be mysite.com?
this should be flexible that only the beta would be removed.
Maybe you could use a ServerAlias in your VirtualHost directive, and use only one VirtualHost directive: