473,387 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

How do I Getting the URL in the Address bar?

Hello,

I want to have a web site at say 192.168.0.1 and have DNS to take
http://www.red.com or http://www.blue.com to 192.168.0.1 and be able to know
witch one was typed in to get to 192.168.0.1.

Thanks,

Jack
Nov 19 '05 #1
3 2708
You need to purchase an address and either get a web host (easiest) or host
the site yourself (which would require a public, static IP address from your
ISP and permission from your ISP.)

You can look at some good options here:
http://www.serverintellect.com

And here's a big list for you:
http://www.asp.net/Hosters/

--
I hope this helps,
Steve C. Orr, MCSD, MVP
http://SteveOrr.net

"Jack" <jo***@webfoxmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hello,

I want to have a web site at say 192.168.0.1 and have DNS to take
http://www.red.com or http://www.blue.com to 192.168.0.1 and be able to
know witch one was typed in to get to 192.168.0.1.

Thanks,

Jack

Nov 19 '05 #2
Jack,

Can I assume that you are using IIS? The first thing you need to do is
setup you IIS to use host headers tpo direct incomming traffic to the
correct website. So you can setup 2 virtual websites in IIS, each running on
port 80. Then set the host headers for each to your domain names.

You need DNS records as well, but I will assume you already have them setup
?

Since the 2 sites are going to be 2 different applications, you will know
that you are at www.red.com when you get pages from www.red.com and
vice-versa.

Does this make sense?

Steve

"Jack" <jo***@webfoxmail.com> wrote in message
news:#y**************@TK2MSFTNGP12.phx.gbl...
Hello,

I want to have a web site at say 192.168.0.1 and have DNS to take
http://www.red.com or http://www.blue.com to 192.168.0.1 and be able to know witch one was typed in to get to 192.168.0.1.

Thanks,

Jack

Nov 19 '05 #3
If I understand your post correctly, you have two DNS names pointing at the
same IP address and you want to know how traffic is being directed to your
site.

Assuming that you already have the site set up and the DNS configured to
point both names to the IP address, you could use:
Request.ServerVariables["SERVER_NAME"]

HTH
--
Dave Fancher
http://davefancher.blogspot.com
"Jack" <jo***@webfoxmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hello,

I want to have a web site at say 192.168.0.1 and have DNS to take
http://www.red.com or http://www.blue.com to 192.168.0.1 and be able to
know witch one was typed in to get to 192.168.0.1.

Thanks,

Jack

Nov 19 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

8
by: Timo | last post by:
I am trying to get address of myStruct to a string array texts. I am using M$ Visual C++ 6.0 (this is not OS specific question, though, this code should also work on 16 bit embedded compiler ;)). ...
5
by: Greg Smith | last post by:
I have been using the following to get the client IP address: Request.ServerVariables All of a sudden it has started returning 127.0.0.1 all the time. Does anybody have any idea why this...
14
by: Ankit Aneja | last post by:
The code of classes given below is for server to which clients connect i want to get ip address of client which has connected pls help how can i get //listen class public class listen {
3
by: Adam Tibi | last post by:
Hi, Is there a way of getting the domain name of tghe currently executing site, I tried using this silly code: public static string GetDomainName() { string serverName =...
4
by: Macca | last post by:
Hi, I am using an asynchronous socket server to allow comms between multiple clients and my server. I know how to obtain the IPAddress of the client (network device) as shown below :- string...
1
by: rahulbsbs | last post by:
Sir how can i get the ip address of the remote system by writting a java code,ie i want to get ip address of the remote system that is connected to my server computer ,the ip address must be...
1
by: simbarashe | last post by:
Hie could someone please help me with getting and using the current page url. I have a function that gets the url, I want to use it with header(location : XXX) but it wont work. The code is as...
0
kaleeswaran
by: kaleeswaran | last post by:
hi! currently i am doing registration form... i like to getting an ip address from the respective system i mean where the user using my application form, the respective system ip address...
2
by: rustyc | last post by:
Well, here's my first post in this forum (other than saying 'HI' over in the hi forum ;-) As I said over there: ... for a little side project at home, I'm writing a ham radio web site in...
7
vikas251074
by: vikas251074 | last post by:
I am getting error above in following code since few days giving tension day and night. How can I solve this? I am facing since Oct.25. in line no. 362 After doing a lot of homework, I am...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.