In order to create a virtual subdomain in PHP, the following conditions must be fulfilled:
– enabled Apache’s Mod_rewrite module
– existing wildcard DNS record
– properly configured .htaccess file
Read more…