GetDotted Domains

Viewing Thread:
"Automatic creation subdomains"

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Wed 16/04/03 at 22:01
Regular
Posts: 787
Can anyone tell me the scripting/code that can allow the end user of my website to create thier own subdomain automaticaly on the website?

If not, does anyone know of an expert chat room where I might find someone who can answer the above question.

Thanks in anticipation of your help.
Thu 17/04/03 at 10:41
Regular
"Devil in disguise"
Posts: 3,151
Well, theres several ways you can do this, some easy some not.

I'm going to presume you're using apache here for a start, the answers for IIS are bit different of course.

2 main methods for doing it really I can think of.
Both involve editing the apache config file, httpd.conf.
Probably the easiest is something like having php (or any scripting language of your choice) append


ServerAdmin [email protected]
DocumentRoot /www/docs/garin/
ServerName garin.mydomain.com


(Of course you need to substitute your own server's ip etc. )
to the httpd.conf file. Create the directory and then force apache to reload the config file. Its not particularly elegant, but it does work.

Or if you want to be really clever, you can try to understand apache mod_rewrite. What you can do with then is set up something clever in your apache config file to extract the subdomain from an address it receives and point it to a directory of the same name. Eg http://garin.mydomain.com
will actually point to a directory called garin somewhere in the domain of mydomain.com. So all you'll need to do is create the directory and your subdomain exists then. I'm not even going to try to start explaining mod_rewrite, else I could be here a while. Had a search on google, and found exactly what you want though.

http://faq.solutionscripts.com/docs/ homefree/tips/subdomains.html

(You'll need to delete the space between docs/ and homefree)

Not all installations of apache have mod_rewrite installed by default but its unusual not to find it there I think these days.

Oh, one final thing, you'll need to make sure that the DNS for your domain handles wild cards, sometimes you will find that only www. gets setup rather than *.mydomain.com all being forwarded to your server.

Sorry I'm not offering little bits of code with the answers (not as simple as that anyway), but you've got a starting point I think. :)
Thu 17/04/03 at 09:39
Regular
"bing bang bong"
Posts: 3,040
You will need to find out what software process causes the creation/activation of subdomains, and trigger that from a php script. Not knowing what that process is, I can't help you any further.
Thu 17/04/03 at 07:37
Regular
Posts: 2
It will be hosted on my own/dedicated web server. So I will have complete control.
Thu 17/04/03 at 00:10
Regular
"Eff, you see, kay?"
Posts: 14,156
It really depends on where your domain is hosted and how much control you have over it.
Wed 16/04/03 at 22:31
Regular
"Chavez, just hush.."
Posts: 11,080
Don't think it will be too easy...

You do know PHP and 'all that' don't you?

I doubt it will be a case of just adding a bit of code..
Wed 16/04/03 at 22:01
Regular
Posts: 2
Can anyone tell me the scripting/code that can allow the end user of my website to create thier own subdomain automaticaly on the website?

If not, does anyone know of an expert chat room where I might find someone who can answer the above question.

Thanks in anticipation of your help.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Unrivalled services
Freeola has to be one of, if not the best, ISP around as the services they offer seem unrivalled.
The coolest ISP ever!
In my opinion, the ISP is the best I have ever used. They guarantee 'first time connection - everytime', which they have never let me down on.

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.