How to use wildcard subdomain in a folder on server public_html/subdomain
问题 I have a wildcard subdomain in a folder public_html/subdomain on my server. I am using php script as follows Just to show you what I am doing on the page: <?php $subdomain = explode('.', $_SERVER['HTTP_HOST']); $subdomain = strtolower(array_shift($subdomain)); echo ucwords(str_replace('-', ' ', $subdomain)); ?> The problem is when example.domain.co.uk is typed in it returns the top level public_html/index.php file and not the public_html/subdomain/index.php I had this working before but I may