Jump to content

add subdomain script


ryanfilard

Recommended Posts

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/

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.

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.