Jump to content

Dynamic subdomain problem


fitguydan

Recommended Posts

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.

Link to comment
https://forums.phpfreaks.com/topic/288876-dynamic-subdomain-problem/
Share on other sites

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 ).

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.