Solved

Subdomain without chaning dns - is there a way?

Posted on 2006-11-22
12
367 Views
Last Modified: 2012-05-05
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.mystupidsite.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?

0
Comment
Question by:foreverdita
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
  • +2
12 Comments
 
LVL 8

Expert Comment

by:esw074
ID: 17997322
Under most circumstances, the DNS record for the domain would include an entry for *.mystupidsite.com, in which case you'd only need to set the subdomain in IIS (probably using host headers).  If your DNS record doesn't already include the wildcard, you can have it added.  The process of setting up the sites can be automated, too.  

http://technet2.microsoft.com/WindowsServer/en/library/ba0e7001-3c41-40b9-b320-b6b6481c97251033.mspx?mfr=true

0
 

Author Comment

by:foreverdita
ID: 17997440
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?
0
 
LVL 58

Expert Comment

by:amit_g
ID: 17997555
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.mystupidsite.com) and follow it all the way.
0
SharePoint Admin?

Enable Your Employees To Focus On The Core With Intuitive Onscreen Guidance That is With You At The Moment of Need.

 
LVL 8

Expert Comment

by:esw074
ID: 17997567
> 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).  
0
 
LVL 22

Expert Comment

by:WMIF
ID: 17999051
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
0
 
LVL 2

Expert Comment

by:poopall
ID: 18004971
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.


0
 
LVL 58

Accepted Solution

by:
amit_g earned 500 total points
ID: 18209207
Since the asker did not respond, we would not know if it worked for him/her or not but the only way to do this in IIS is to use host headers - the way I suggested.
0
 
LVL 22

Expert Comment

by:WMIF
ID: 18211635
@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.
0
 
LVL 58

Expert Comment

by:amit_g
ID: 18211857
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.
0
 
LVL 22

Expert Comment

by:WMIF
ID: 18424448
nice...
0

Featured Post

Salesforce Made Easy to Use

On-screen guidance at the moment of need enables you & your employees to focus on the core, you can now boost your adoption rates swiftly and simply with one easy tool.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Hello, all! I just recently started using Microsoft's IIS 7.5 within Windows 7, as I just downloaded and installed the 90 day trial of Windows 7. (Got to love Microsoft for allowing 90 days) The main reason for downloading and testing Windows 7 is t…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…
This video Micro Tutorial shows how to password-protect PDF files with free software. Many software products can do this, such as Adobe Acrobat (but not Adobe Reader), Nuance PaperPort, and Nuance Power PDF, but they are not free products. This vide…

726 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question