Change the DirectoryIndex based on a domain/sub-domain in .htaccess
snippet in htaccess

Change the DirectoryIndex based on a domain/sub-domain in .htaccess

user9749

SetEnvIf Host ^www\. page=www
SetEnvIf Host ^mobile\. page=mobile
rewriterule ^.*$ test.php?subdomain=%{ENV:page} [QSA,L]