473,327 Members | 2,069 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,327 software developers and data experts.

Serving a website based on source internet address ?

Hello,

Based on the source internet address a different version of the website
should be presented/served to the user/browser.

For example in pseudo code:

if SourceAddress = '143.3.5.1' then
begin
ShowBlueWebsite; // Load/Show BlueIndex.htm
end else
if SourceAddress = '124.5.15.7' then
begin
ShowRedWebsite; // LoadShow RedIndex.htm
end;

Is this possible with C sharp ? is there any source code available
to do this trick ?

Bye,
Skybuck.

Aug 29 '06 #1
2 1408
Not sure why you would want to do this on a public network but can think of
some senarios on a private network.

You can get the client IP address using Request.UserHostAddress and then
redirect to the correct page/version of your web site.

-Andy

"Skybuck" <sk*********@hotmail.comwrote in message
news:11*********************@m79g2000cwm.googlegro ups.com...
Hello,

Based on the source internet address a different version of the website
should be presented/served to the user/browser.

For example in pseudo code:

if SourceAddress = '143.3.5.1' then
begin
ShowBlueWebsite; // Load/Show BlueIndex.htm
end else
if SourceAddress = '124.5.15.7' then
begin
ShowRedWebsite; // LoadShow RedIndex.htm
end;

Is this possible with C sharp ? is there any source code available
to do this trick ?

Bye,
Skybuck.

Aug 29 '06 #2
Skybuck,

If I understand you well, and you are getting the IP address from the
servervariables from the client, than the normal response.redirect will do
in my opinion the trick for you.

http://msdn2.microsoft.com/en-us/library/t9dwyts4.aspx

I hope this helps,

Cor

"Skybuck" <sk*********@hotmail.comschreef in bericht
news:11*********************@m79g2000cwm.googlegro ups.com...
Hello,

Based on the source internet address a different version of the website
should be presented/served to the user/browser.

For example in pseudo code:

if SourceAddress = '143.3.5.1' then
begin
ShowBlueWebsite; // Load/Show BlueIndex.htm
end else
if SourceAddress = '124.5.15.7' then
begin
ShowRedWebsite; // LoadShow RedIndex.htm
end;

Is this possible with C sharp ? is there any source code available
to do this trick ?

Bye,
Skybuck.

Aug 29 '06 #3

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

Similar topics

4
by: john Q | last post by:
I found a PHP based email obfuscator for use in websites, where the source HTML (PHP, actually) file doesn't contain the actual email address in the Mailto tag, but generates it and that...
11
by: Bozo Schmozo | last post by:
Greetings! I've searched groups.google.com already to see if I can determine if using PHP/MySQL (if needed) for a web site I wish to develop. As the subject indicated, it will be a content...
10
by: JP Bless | last post by:
Hi all, I have a database Access/MSDE and would like to have a website so users can search the data and update some records/fields through the website.... And I have high speed internet...
3
by: Navodit | last post by:
Hi I have a problem in which I am not sure if Javascript can or should be used. If anyone can throw light on this it wd be great : Basically I am working on the development of a database where...
3
by: Navodit | last post by:
Hi I have a very basic question regd retrieving information from website using a scripting language: Basically I am working on the development of a database where a user enters an address...
5
by: Skybuck | last post by:
Hello, Based on the source internet address a different version of the website should be presented/served to the user/browser. I would like to keep the script as simple as possible and it...
2
by: Skybuck | last post by:
Hello, Based on the source internet address a different version of the website should be presented/served to the user/browser. For example in pseudo code: if SourceAddress = '143.3.5.1'...
1
by: Skybuck | last post by:
Hello, Based on the source internet address a different version of the website should be presented/served to the user/browser. For example in pseudo code: if SourceAddress = '143.3.5.1'...
6
by: Mandar | last post by:
Hi, I have written some code in C# to programmatically create a website and an application pool. Both seems to be getting created alright with whatever settings I have applied. However, when I...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.