foreverdita
asked on
Subdomain without chaning dns - is there a way?
I have a site - let's call it - www.mystupidsite.com
It is a Microsoft server platform (2003 to be exact) with IIS.
I do not manage my dns.
I would like to find a way to set up a virtual directory for a subdomain - let's call it: noonewillvisit.mystupidsit e.com
I want to eventually automate this process, so that I can create a script that will take the contents of a form, add an entry, and create subdomains on the fly:
site1.mystupidsite.com
site2.mystupidsite.com
etc.
In Apache, this is quite easy - I can add a permanant redirect ion the .htaccess folder and redirect to the actual directory I want to view.
Is there ANY way to do this in Windows without having to add a record for the subdomain and wait for dns to propagate or am I fooling myself with this notion?
It is a Microsoft server platform (2003 to be exact) with IIS.
I do not manage my dns.
I would like to find a way to set up a virtual directory for a subdomain - let's call it: noonewillvisit.mystupidsit
I want to eventually automate this process, so that I can create a script that will take the contents of a form, add an entry, and create subdomains on the fly:
site1.mystupidsite.com
site2.mystupidsite.com
etc.
In Apache, this is quite easy - I can add a permanant redirect ion the .htaccess folder and redirect to the actual directory I want to view.
Is there ANY way to do this in Windows without having to add a record for the subdomain and wait for dns to propagate or am I fooling myself with this notion?
ASKER
Right - I am good to go on the automating part once I find the manual process that works. I am looking for a manual process that works - then I can add the automated stuff after.
So in other words, once I have the *.mystupidsite.com working, what can I do in IIS that mimicks the redirect in apache for sub.mystupidsite.com
I guess I am looking for the actual host header file (somewhere on the server) to make the changes and then eventually automate the writing script.
Does this make sense?
So in other words, once I have the *.mystupidsite.com working, what can I do in IIS that mimicks the redirect in apache for sub.mystupidsite.com
I guess I am looking for the actual host header file (somewhere on the server) to make the changes and then eventually automate the writing script.
Does this make sense?
In IIS it would be a new site, not a virtual directory.
http://www.startvbdotnet.com/aspsite/extras/deploy2.aspx
In the IP address and post settings stage, you need to put the same IP and same port and add the new host header (noonewillvisit.mystupidsi te.com) and follow it all the way.
http://www.startvbdotnet.com/aspsite/extras/deploy2.aspx
In the IP address and post settings stage, you need to put the same IP and same port and add the new host header (noonewillvisit.mystupidsi
> So in other words, once I have the *.mystupidsite.com working, what can I do in IIS that mimicks the redirect in apache for sub.mystupidsite.com
Assuming you want to create these as separate sites, the simplest manual process would be to go into IIS and create a new site. On the "Web Site" tab under site properties, there's a Web Site Identification section with the IP address of the site. Next to that is a button that says "Advanced...". Click on that, and you'll have a section called "Multiple Identities for this Web Site". Here's where you would add "site1.mystupidsite.com" (under Host Header Value).
Assuming you want to create these as separate sites, the simplest manual process would be to go into IIS and create a new site. On the "Web Site" tab under site properties, there's a Web Site Identification section with the IP address of the site. Next to that is a button that says "Advanced...". Click on that, and you'll have a section called "Multiple Identities for this Web Site". Here's where you would add "site1.mystupidsite.com" (under Host Header Value).
if you can get any components installed, then you can use something like this to rewrite the host header. this would all be contained into one site in iis, but many directories inside that site.
http://www.isapirewrite.com/docs/#RewriteHeader
http://www.isapirewrite.com/docs/#RewriteHeader
Set up IIS, and set up the sub domain at your DNS hosting provider.
The do a simple response.redirect on the default page of the new sub domain start page with a variable passed as to which domain the redirect it came from .
You can then run the appropriate script based on the variable passed.
The do a simple response.redirect on the default page of the new sub domain start page with a variable passed as to which domain the redirect it came from .
You can then run the appropriate script based on the variable passed.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
@amit_g - if you read through the documentation that i linked to, you can see that iis is perfectly capable of handling this setup through the isapi rewrite component. the website properties have an option to respond to specific host headers as you have indicated, but it can also respond to any host header that is sent to the ip address (which is actually the default configuration).
i believe that i have answered the askers question exactly.
-my suggestion satisfies the askers first requirement which is no changes made in the dns (assuming that the dns was configured properly to forward any host to the parent domain).
-it also satisfies the second requirement of making this an automated process. the rewrite filter does not need to be changed once initially setup. the server would take the input from the form and create a folder inside the main website directory. the rewrite filter would pull the value out of the sub-domain entered, and direct the request to the folder with that same name.
>>In Apache, this is quite easy - I can add a permanant redirect ion the .htaccess folder and redirect to the actual directory I want to view.
-my suggestion also basically replicates this same process. the apache server is doing the same process as the isapi rewrite component. iis does not have the built in functionality of rewriting like the apache server does, so you have to help it out by installing a component like the one i have suggested.
i believe that i have answered the askers question exactly.
-my suggestion satisfies the askers first requirement which is no changes made in the dns (assuming that the dns was configured properly to forward any host to the parent domain).
-it also satisfies the second requirement of making this an automated process. the rewrite filter does not need to be changed once initially setup. the server would take the input from the form and create a folder inside the main website directory. the rewrite filter would pull the value out of the sub-domain entered, and direct the request to the folder with that same name.
>>In Apache, this is quite easy - I can add a permanant redirect ion the .htaccess folder and redirect to the actual directory I want to view.
-my suggestion also basically replicates this same process. the apache server is doing the same process as the isapi rewrite component. iis does not have the built in functionality of rewriting like the apache server does, so you have to help it out by installing a component like the one i have suggested.
You are right. If component can be installed, isapi rewrite is the way to go. The only reason I stayed out of it was an assumption that if the asker can't manage their own DNS which is far cheaper and easier to do, the asker probably doesn't own the server also. Since the asker did not respond, we won't know. I am fine with your answer being selected. In my opinion this question has PAQ value so should not be deleted.
nice...
http://technet2.microsoft.com/WindowsServer/en/library/ba0e7001-3c41-40b9-b320-b6b6481c97251033.mspx?mfr=true