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.
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.
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. :)
You do know PHP and 'all that' don't you?
I doubt it will be a case of just adding a bit of code..
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.