ryanfilard Posted June 5, 2011 Share Posted June 5, 2011 Is there a way when a user signs up it can make a subdomain Quote Link to comment https://forums.phpfreaks.com/topic/238507-add-subdomain-script/ Share on other sites More sharing options...
RussellReal Posted June 5, 2011 Share Posted June 5, 2011 Not with php, atleast I'm 90% sure you can't with php, unless you modify your apache config files, which you probably can't due to permissions issues.. what you CAN do, is contact your hosting provider, ask them to impliment wildcard subdomains.. and so whenever you go to whateverYouWant.yourdomain.com it'll know to go to whichever directory, in there you use modrewrite (htaccess rewrite engine) to detect the subdomain and reform the request to something similar to: yourdomain.com/whateverYouWant/ Quote Link to comment https://forums.phpfreaks.com/topic/238507-add-subdomain-script/#findComment-1225647 Share on other sites More sharing options...
xyph Posted June 5, 2011 Share Posted June 5, 2011 Shared hosting? You can, but it's a hack. It involves cURL'ing into your cPanel and emulating what you'd do manually. I wouldn't suggest asking for help on this one, as the method will change with each host, and we can't test/debug without having access to your cPanel. Are you running your own server? If so, it's much easier. Quote Link to comment https://forums.phpfreaks.com/topic/238507-add-subdomain-script/#findComment-1225655 Share on other sites More sharing options...
ryanfilard Posted June 6, 2011 Author Share Posted June 6, 2011 I am running my own sever with cpanel Quote Link to comment https://forums.phpfreaks.com/topic/238507-add-subdomain-script/#findComment-1225710 Share on other sites More sharing options...
xyph Posted June 6, 2011 Share Posted June 6, 2011 Linux/Apache/TinyDNS? Quote Link to comment https://forums.phpfreaks.com/topic/238507-add-subdomain-script/#findComment-1225962 Share on other sites More sharing options...
ryanfilard Posted June 6, 2011 Author Share Posted June 6, 2011 Linux Quote Link to comment https://forums.phpfreaks.com/topic/238507-add-subdomain-script/#findComment-1226021 Share on other sites More sharing options...
xyph Posted June 6, 2011 Share Posted June 6, 2011 It's also important to know your DNS and Web server. Quote Link to comment https://forums.phpfreaks.com/topic/238507-add-subdomain-script/#findComment-1226143 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.