Click to See Complete Forum and Search --> : How to create subdomains in php via script?
dineshmatolia
Nov 13th, 2008, 07:14 AM
How to create subdomains in php via script?
penagate
Nov 13th, 2008, 08:03 AM
If you modify the access level of the web browser's configuration file (usually 'httpd.conf' or similar) appropriately, you could read from and write to that file using a PHP script.
the182guy
Nov 13th, 2008, 08:25 AM
Hi dineshmatolia,
penegate is hinting that you can create subdomains by adding rules to the httpd.conf file. So your going to need permission to access that file. If you're on a shared host then it is unlikely that they will allow you to write to that file.
They may allow you to create subdomains via a control panel however.
penagate
Nov 13th, 2008, 07:16 PM
You'll also need to modify your DNS records appropriately. If you haven't already, I suggest adding a catch-all (wildcard) record, which will allow you to receive all requests to your domain regardless of subdomain. You can then control the subdomains via your web server's configuration file, if you have the appropriate access rights. I agree that on shared hosting this is less likely to be possible.
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.