Serving a website based on source internet address ?

  • Thread starter Thread starter Skybuck
  • Start date Start date
S

Skybuck

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.
 
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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top