ohdang888 Posted October 5, 2009 Share Posted October 5, 2009 can you create a subdomain of your site through php, or do sites like blogspot just use mod rewrites and pass the name of the subdomain to a page, which processes it from there? Thanks Quote Link to comment https://forums.phpfreaks.com/topic/176504-subdomain-creation/ Share on other sites More sharing options...
redarrow Posted October 5, 2009 Share Posted October 5, 2009 Any big web site will use the proper sub domain from there real domain name. but saying that also there use mod rewrite some url for security. what is it you need to learn cheers. buy the way it normally apache server that does all the work and a php plugin to get it to work with php. Quote Link to comment https://forums.phpfreaks.com/topic/176504-subdomain-creation/#findComment-930401 Share on other sites More sharing options...
mikesta707 Posted October 5, 2009 Share Posted October 5, 2009 How do I create subdomains? Everyone has a "www" subdomain (In "www.yourdomain.com", the "www" part is the subdomain). The www subdomain is created by, and serves files from, your /htdocs/www directory on the filesystem. To add more subdomains, just create new subdirectories in the /htdocs directory. For instance, if you had the domain name mychevycars.com and wanted a subdomain for Corvettes, then you would just create the directory /htdocs/corvettes and upload the files in there that you wanted to see at http://corvettes.mychevycars.com taken from http://forums.digitalpoint.com/showthread.php?t=53570 Quote Link to comment https://forums.phpfreaks.com/topic/176504-subdomain-creation/#findComment-930406 Share on other sites More sharing options...
redarrow Posted October 5, 2009 Share Posted October 5, 2009 How do I create subdomains? Everyone has a "www" subdomain (In "www.yourdomain.com", the "www" part is the subdomain). The www subdomain is created by, and serves files from, your /htdocs/www directory on the filesystem. To add more subdomains, just create new subdirectories in the /htdocs directory. For instance, if you had the domain name mychevycars.com and wanted a subdomain for Corvettes, then you would just create the directory /htdocs/corvettes and upload the files in there that you wanted to see at http://corvettes.mychevycars.com what that saying is create a www directory folder, then create a sub domain, then show the directory www/new-sub-domain.co.uk with the new sub domain and you got a full domain name. That also funny to technically think about if your into dns. Quote Link to comment https://forums.phpfreaks.com/topic/176504-subdomain-creation/#findComment-930409 Share on other sites More sharing options...
MadTechie Posted October 5, 2009 Share Posted October 5, 2009 It really depends how your servers setup, you could do it via php + .htaccess if you wanted it more dynamic but for control I use apache (*vhost) *apache restart required Quote Link to comment https://forums.phpfreaks.com/topic/176504-subdomain-creation/#findComment-930412 Share on other sites More sharing options...
redarrow Posted October 5, 2009 Share Posted October 5, 2009 what is the .htaccesses way please and the dynamic way(rewriteurl) very interesting. full examples anybody. i use Apache to do this under vhost proxy love the idea of the dynamic way via php and .htaccess Quote Link to comment https://forums.phpfreaks.com/topic/176504-subdomain-creation/#findComment-930414 Share on other sites More sharing options...
ohdang888 Posted October 5, 2009 Author Share Posted October 5, 2009 ya please elaborate Quote Link to comment https://forums.phpfreaks.com/topic/176504-subdomain-creation/#findComment-930999 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.