Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Windows 2003 subdomain redirection

Posted on 2008-10-04
2
Medium Priority
?
336 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 2000 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

Ask an Anonymous Question!

Don't feel intimidated by what you don't know. Ask your question anonymously. It's easy! Learn more and upgrade.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Preparing an email is something we should all take special care with – especially when the email is for somebody you may not know very well. The pressures of everyday working life stacked with a hectic office environment can make this a real challen…
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an anti-spam), the admin…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…

824 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