Hey,

I am working on a project that requires dynamic sub domains...

for example user1.mydomain.com and user2.mydomain.com etc...

But I am having some trouble... I have setup the wildcard A record and all of that is working fine. The problem is my application uses ajax and because the domain is on a subdomain the ajax are not working as it thinks its cross domain... so...

Is there any way I can just treat the subdomain as a variable... so somehow I can pull the user1 part of the domainname and still treat the code like it is top level domain... so the ajax will still think the domain is mydomain.com without the user1.mydomain.com

I hope this makes sence...

Thanks
Dan

Member Avatar for diafol

Ok. Get back to us with what you find out.

That worked, sorted thanks for your help!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.