fitguydan Posted May 30, 2014 Share Posted May 30, 2014 I did a project for a client over a year ago and never ran into this problem on their shared server, but now I'm having this problem on my own... and I'm not sure why. I want to give free members their own subdomain. I want the php files to scan the subdomain to determine which pages to display. So like my index.php would scan the subdomain and show the corresponding user's home page so that if you go to someguy.thisdomain.com, it would really just scan index.php at thisdomain.com and act accordingly. On the other project, no extra folders were created. I know that subdomains can be created in cpanel and then extra folders would be added and whatnot, but I was able to effectively use subdomains for users without htaccess or any sort of cpanel functions. The main problem is when I test subdomains. I have php code that just echos "Subdomain is blah" and it works when I go to www.mydomain.com and also just mydomain.com, but when I go to test.mydomain.com, it gives an error as if the domain doesn't exist. Quote Link to comment https://forums.phpfreaks.com/topic/288876-dynamic-subdomain-problem/ Share on other sites More sharing options...
Ch0cu3r Posted May 30, 2014 Share Posted May 30, 2014 Not sure but it sounds to me you need to setup wildcard subdomains so all subdomains point to thisdomain.com. Quote Link to comment https://forums.phpfreaks.com/topic/288876-dynamic-subdomain-problem/#findComment-1481385 Share on other sites More sharing options...
Ansego Posted June 1, 2014 Share Posted June 1, 2014 Um, not 100% sure on the question, sounds to me might be a DNS problem or web service that your using has not binded the subdomain. Also agree with Ch0cu3r in regards if they are all going to mydomain.com why not just make a wild card sub domain ( *.mydomain.com ). Quote Link to comment https://forums.phpfreaks.com/topic/288876-dynamic-subdomain-problem/#findComment-1481522 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.