[General]Subdomain Creation
I'm not even sure how to word this lol
Basically I want to be able to submit a form a form and it will add a subdomain to the dns and write a rewrite rule to send a url variable to that subdomain.
site.com/page.etc?user=Wh005h -> wh005h.site.com
The part I need help with is the subdomain part >.> I just need to know what all goes into carrying that out. I would suppose I need some sort of access to the dns server =/ - shrugs -
Everything I've read so far just says to put the subdomain rewrite in and it works but I don't think it works like that, pretty sure I have to propagate it and have it sync with the dns because that would mean that all subdomains are defaulted to the base ip until otherwise stated, and they aren't.
Re: [General]Subdomain Creation
Perhaps you can get the code by viewing the cPanel sourcecode?
Rewrite url is not for the domain name, is it?
Apparently you only have to create a directory in the htdocs directory, and it works...
How do I create subdomains?
But I can't find any htdocs directory on my server, prolly blocked.
What I know, is that www is the default subdomain. And I dont think you have to add the new subdomain to the dns...the last part (ie site.com) will just refer to your server, and than the subdomain(s) will be analysed. I mean, what would adding subdomains to your dns do? They do not refer to another ip...but I have not much experience at this subject though...
Re: [General]Subdomain Creation
Quote:
Originally Posted by
username
Maybe u can get CPanel
He want to add subdomains with a script, hes not asking for cPanel...
Re: [General]Subdomain Creation
My current host makes new subdomains through the httpd.conf I think.
All my subdomains have different ips than the base domain.Maybe it's just the way they have it setup and it doesn't really require that much work. So it would depend on the webhost if it works like that.
I asked my webhost and the tech's response was "You have to make them manually" I figured I wouldn't get much more from him so I decided that was enough to conclude that I won't be able to use folders as subdomains.
Also, htdocs is the standard folder for apache.
// Edit
Okay, I did some more reading
Code:
RewriteEngine On
Options +FollowSymlinks
RewriteBase /
RewriteCond %{HTTP_HOST} bro.acgcny.com
RewriteCond %{REQUEST_URI} !bro/
RewriteRule ^(.*)$ bro/$1 [L]
Is the example of the rewrite rule. Basically you can create subdomains and subsubdomains (lol, for example: test.test.sitename.com).
So basically you can change around that rule to accept url variables rather than folders as the subdomain =)
Let me write it real quick and I'll post it ^_^ I'm not too good with mod coding.
// Edit
Okay did more research. You do need to put it in your dns. It is considered a domain so it has to be propogated through the dns servers to work. It's not the web server that serves it but the dns server.
It sounds like I need access to the dns settings of the domain manually to do this.
Re: [General]Subdomain Creation
Quote:
Originally Posted by
Wh005h
Okay did more research. You do need to put it in your dns. It is considered a domain so it has to be propogated through the dns servers to work. It's not the web server that serves it but the dns server.
It sounds like I need access to the dns settings of the domain manually to do this.
Yeah, I think you have to. I tried to use the .htaccess file to 'create' subdomains. But when I tried to go there it said 'Server not found', so its set on the dns server; which is restricted for me :P (I can have maximal 5 subdomains ^^).
Re: [General]Subdomain Creation
If you use windows then you do have to add it to the dns.. windows already come with dns you just have to enable it.
Re: [General]Subdomain Creation
Quote:
Originally Posted by
locolijo
If you use windows then you do have to add it to the dns.. windows already come with dns you just have to enable it.
#1 Im almost sure this in Linux
#2 Isn't the DNS stored on a dns server?
Re: [General]Subdomain Creation
I believe the changes have to be made with the name server. I suggest getting a cheap DNS service that lets you have domains using their name servers, then create the necessary subdomains there, then add said subdomains to the apache config file.
Re: [General]Subdomain Creation
If you still not understand it, you can go to your host.
Correct me if i'm wrong.
Re: [General]Subdomain Creation
Yah I'm SoL for now.This might be a good reason to find a provider I can talk one-on-one with and not a faceless company.
That or rent a dedicated which I would prefer not to have since I don't feel like doing the work myself =)
I could really use a good provider that is pretty cheap.
Re: [General]Subdomain Creation
gem3.com, I love their support ;). Quite a small company with a lot of contact with the owners, you can get everything you want :).
Re: [General]Subdomain Creation
Quote:
Originally Posted by
Daevius
gem3.com, I love their support ;). Quite a small company with a lot of contact with the owners, you can get everything you want :).
It's too expensive >.>
one.com is better since they have unmetered b/w and 4tb space for like 6 usd a month lol
Pieman said it was pretty good in a post earlier.
What I'm actually looking for is someone I can talk to one-on-one like on msn and have them set me up some stuff on their side so I can have partial access to their name server or something.
Re: [General]Subdomain Creation
Quote:
Originally Posted by
Wh005h
It's too expensive >.>
one.com is better since they have unmetered b/w and 4tb space for like 6 usd a month lol
Pieman said it was pretty good in a post earlier.
What I'm actually looking for is someone I can talk to one-on-one like on msn and have them set me up some stuff on their side so I can have partial access to their name server or something.
Lol, seems you misread. Only 4gb for 6USD
Re: [General]Subdomain Creation
4GB? You can usually get about 5GB from free hosts.
Re: [General]Subdomain Creation
Quote:
Originally Posted by
Pieman
Lol, seems you misread. Only 4gb for 6USD
Dam I guess it was too good to be true lol
Well I gotta find another host then... crap...
Yah I misread it, I don't know what I was thinking, oh well =(
I suppose I really do have to find a person to host with rather than a company now. It seems kinda impossible to find what I'm looking for in most standard packages.
Re: [General]Subdomain Creation
just create a rewrite rule, if you enter that url it forwards it to the ?user=name
there are good things for this so you can keep the url, cheap :p
Re: [General]Subdomain Creation
Quote:
Originally Posted by
Mustek
just create a rewrite rule, if you enter that url it forwards it to the ?user=name
there are good things for this so you can keep the url, cheap :p
Didnt work for me, couldnt find server. Must be set on the DNS server, than it will redirect to your site and you can pimp it with some modrewrite shit.