I have set wildcard vhosts in my apache like
<VirtualHost *>
ServerName wildcard.test.com
ServerAlias *.test.com
DocumentRoot = /var/www/test
# other configuration for this app here
</VirtualHost>
I have created some sub domains like front.test.com
and admin.test.com
. I just want to know if there is a way in APACHE to get the first part of the URL like in above cases, I want test and admin and send it to my server side language some how. I repeat that I am looking for a possible way in apache, as people always say
you can not always trust what $_SERVER returns I will go for server side after confirming that there is not any way doing it on apache Thanks