Solved

Windows 2003 subdomain redirection

Posted on 2008-10-04
2
319 Views
Last Modified: 2012-06-22
On a Windows 2003 server with IIS 6
When someone visits http://thiscouldbeanything.mydomain.com, I would like them to be redirected to http://mydomain.com/index.asp?id=thiscouldbeanything

I want to do this without having to setup subdomains, meaning what ever is used as a subdomain name this redirection would work. example: http://abc.mydomain.com would be redirected to http://mydomain.com/index.asp?id=abc

Can someone help me with this?
0
Comment
Question by:gosonic
2 Comments
 
LVL 8

Accepted Solution

by:
sstone55423 earned 500 total points
ID: 22642746
If you set up your DNS with an @ record pointing to your server at mydomain.com, then it acts as a wildcard, and anything at your domain (that is not actually listed there) will go to your default.
You then need to modify the default.asp page on the default server to redirect.
 
With the default.asp, look for "server_name" and then redirect to http://mydomain.com/index.asp?id=server_name
Dim SrvName
SrvName = Split(Request.ServerVariables("server_name"), ".")  
 
0
 

Author Closing Comment

by:gosonic
ID: 31503113
thanks
0

Featured Post

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

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

Suggested Solutions

On July 14th 2015, Windows Server 2003 will become End of Support, leaving hundreds of thousands of servers around the world that still run this 12 year old operating system vulnerable and potentially out of compliance in many organisations around t…
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

713 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