I am trying to figure out a way to make my startpage load when I type in a domain.
Example:
yahoo.com => [my.yahoo.com...]
I know I can set a domain to point to a specified IP in my HOSTS file, but how can I do a "redirect" to a page other than the index file on the IP?
Thanks!
Erik
In windows (ASP) you could point the domain to any one of your sites. At the top of the index.asp or default.asp page you would add code to determine which is the domain name that has been used to visit your site. After that, you just redirect.
<%
domain = lcase (request.servervariables("SERVER_NAME"))
select case domain
case "www.example.com", "example.com"
response.redirect("your-page.html")
end select
%>
This code goes before anything else on the page.
One idea I had was to create a yahoo.com zone on my server, and then have it redirect to the page I want. Then just add my server's IP into my local hosts file and be good to go.
But if I could do a direct redirection in the hosts file (or lmhosts, or some other file)
yahoo.com => my.yahoo.com
Thanks!