[THIN] Re: Web Interface Redirect by IP

  • From: "Andrew Rogers" <Andrew.Rogers@xxxxxxxxxxxxxxxxxx>
  • To: <thin@xxxxxxxxxxxxx>
  • Date: Fri, 20 Feb 2004 10:39:54 +0000

gah, dont you know too much information is dangerous? :)

Andrew
--o--

>>> Neil.Braebaum@xxxxxxxxxxxxxxxxx 20/02/04 10:18:28 >>>
Realistically, you are going to have to token-ise the string with the IP
address in, and break it up on the period in the address, 'cos the
octets can vary in string length.

The other thing to bear in mind, is that the select...case...endselect
construct in vbscript allows multiple conditions for each 'case' section
- separated by commas.

As Andrew mentioned in his follow up message, though - don't forget
these are treated as strings, and should be in quotes (") - just that
you replied to the uncorrected message. Oh, and don't cross the red and
blue wires ;-)

Neil

> -----Original Message-----
> From: Seitz, Linden [mailto:L.Seitz@xxxxxxx]=20
> Sent: 19 February 2004 17:37
> To: 'thin@xxxxxxxxxxxxx'=20
> Subject: [THIN] Re: Web Interface Redirect by IP
>=20
> Excellent!  One other question as a result of my lack of knowledge?
>=20
> If I wanted to redirect by the value in the first octet, how=20
> could i split that out?  Let's say that I wanted to direct=20
> all 10.x.y.z addresses to the WI page and 172.x.y.z addresses=20
> to google?
>=20
> -----Original Message-----
> From: thin-bounce@xxxxxxxxxxxxx [mailto:thin-bounce@xxxxxxxxxxxxx]On=20
> Behalf Of Andrew Rogers
> Sent: Thursday, February 19, 2004 8:49 AM
> To: thin@xxxxxxxxxxxxx=20
> Subject: [THIN] Re: Web Interface Redirect by IP
>=20
>=20
> in which case something like this should suit you, maybe!
> <%
> sIP =3D3D Request.ServerVariables("REMOTE_ADDR")
> Select Case sIP
> Case 127.0.0.1
>       Server.Transfer "http://server/localpage.htm";
> Case 255.255.255.255
>       Server.Transfer "http://server/anotherpage.htm";
> Case Else
>       Server.Transfer "http://www.google.com";
> End Select
> %>
>=20
> Obviously you can have as many Case's as you like! :)
> Something like the above would do fine as an index.asp
>=20
> Andrew

***********************************************
This e-mail and its attachments are confidential
and are intended for the above named recipient
only. If this has come to you in error, please=20
notify the sender immediately and delete this=20
e-mail from your system.
You must take no action based on this, nor must=20
you copy or disclose it or any part of its contents=20
to any person or organisation.
Statements and opinions contained in this email may=20
not necessarily represent those of Littlewoods.
Please note that e-mail communications may be monitored.
The registered office of Littlewoods Limited and its
subsidiaries is 100 Old Hall Street, Liverpool, L70 1AB.
Registered number of Littlewoods Limited is 262152.
************************************************

********************************************************
This weeks sponsor Vizioncore, Inc.=20
--> vc-iMonitor - Performance Monitoring, Control & Reporting=20
--> vc-iControl - Desktop & Start Menu Management & Reporting=20
--> vc-iMapper - Drive, Printer & COM Management & Reporting=20
http://vizioncore.com/products.html=20
**********************************************************
Useful Thin Client Computing Links are available at:
http://thethin.net/links.cfm=20
***********************************************************
For Archives, to Unsubscribe, Subscribe or=20
set Digest or Vacation mode use the below link:
http://thethin.net/citrixlist.cfm

********************************************************
This weeks sponsor Vizioncore, Inc. 
--> vc-iMonitor - Performance Monitoring, Control & Reporting 
--> vc-iControl - Desktop & Start Menu Management & Reporting 
--> vc-iMapper - Drive, Printer & COM Management & Reporting 
http://vizioncore.com/products.html 
**********************************************************
Useful Thin Client Computing Links are available at:
http://thethin.net/links.cfm
***********************************************************
For Archives, to Unsubscribe, Subscribe or 
set Digest or Vacation mode use the below link:
http://thethin.net/citrixlist.cfm

Other related posts: