Try taking out the leading <crlf> before each IP address. It should work then.
Dave Shelley -----Original Message----- From: Fogelson, Steve [mailto:[EMAIL PROTECTED] Sent: February 11, 2004 5:32 PM To: '[EMAIL PROTECTED]' Subject: RE: Witango-Talk: requests for ip address vs. domain names Sorry the 207.170.44.180 should have been 110.170.44.180. Still no results. Steve -----Original Message----- From: Fogelson, Steve [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 4:15 PM To: [EMAIL PROTECTED] Subject: RE: Witango-Talk: requests for ip address vs. domain names I decided to translate the ip to the proper domain and redirect. I used the following code to translate, but it doesn't find a value. Does it have anything to do with the numbers and decimals in an ip address? It works fine if I filter on column 2 for test.com. <@assign request$domains "<@array rows=9 cols=2 value=' 110.170.44.180,test.com; 110.170.44.181,test1.com; 110.170.44.182,test2.com; 110.170.44.183,test3.com; 110.170.44.184,test4.com; 110.170.44.185,test5.com; 110.170.44.186,test6.com; 110.170.44.187,test7.com; 110.170.44.188,test8.com '>"> <@assign request$new "<@filter request$domains expr='#1="207.170.44.180"'>"> <@var request$new><br> Thanks Steve -----Original Message----- From: Robert Shubert [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 3:07 PM To: [EMAIL PROTECTED] Subject: RE: Witango-Talk: requests for ip address vs. domain names Actually, that should work, hostheaders override IPs... SITE 1 > 123.123.123.123 www.domain.com SITE 2 > 123.123.123.123 (blank) http://www.domain.com/ goes to site 1 http://123.123.123.123/ goes to site 2 (I should note that's in IIS5/Win2K) Don't forget though that in Witango you can use <@DOMAIN> to see the www.domain.com or "123.123.123.123" and react accordingly. Robert -----Original Message----- From: Scott Cadillac [mailto:[EMAIL PROTECTED] Sent: Wednesday, February 11, 2004 3:10 PM To: [EMAIL PROTECTED] Subject: RE: Witango-Talk: requests for ip address vs. domain names Hi Steve, I was afraid you'd might come back with a reply like that :-) I believe IP addresses override Host Header entries. I prefer going with all Host Header entries myself, because then I only need one IP address for an unlimited number of Websites (all can be in different directories too). ---- If this is the way things are working for you, maybe working something into your code is the better solution. Besides, having some code to handle "was not found in the site table lookup" is a good idea anyway. Then you can redirect them to a special page that lists all your "known" domains that the user can choice from. Hope that helps. Cheers... Scott Cadillac, 403-281-6090 ~ [EMAIL PROTECTED] ------------ XML-Extranet ~ http://xmlx.ca ~ http://forums.xmlx.ca Well-formed Programming in C# .NET, Witango, MSIE and XML ------------ Witango ~ http://witango.org EasyXSLT ~ http://easyxslt.ca IIS Watcher ~ http://iiswatcher.ca ------------ -----Original Message----- From: "Fogelson, Steve" <[EMAIL PROTECTED]> To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> Date: Wed, 11 Feb 2004 13:56:52 -0600 Subject: RE: Witango-Talk: requests for ip address vs. domain names > Scott, > > I assign an ip address to each web site and have not used host headers. > Would I need a "dummy" web site for each real web site for each ip > address? > > I set one up the way you described. With the host header value set to > the ip > address and the ip address to All Unassigned and it still goes to the > real > site with that address. Is it because I assign an ip address to the > real > site? > > I guess I was wondering if I could handle this in Witango. If the > domain (ip > address) was not found in the site table lookup, could I redirect with > something like the following? > > <@assign request$httpHeader "HTTP/1.0 302 Moved<@CRLF>"> Except change > the > 302 code to something more appropriate, but I don't know what. > > Steve > > -----Original Message----- > From: Scott Cadillac [mailto:[EMAIL PROTECTED] > Sent: Wednesday, February 11, 2004 1:33 PM > To: [EMAIL PROTECTED] > Subject: RE: Witango-Talk: requests for ip address vs. domain names > > > Hi Steve, > > There is more than one way to do this with IIS, but maybe the easiest > is > just to: > > ~ Create a new Website in IIS. > ~ Go to "Properties" for the new Website. > ~ Go to the "Website" tab. > ~ Click the "Advanced" button. > ~ And edit the "Host Header Name" with the IP address. > > Normally you would put a domain name in "Host Header Name", but you can > also put an IP address there as well. > > Then all traffic using just the IP address will go to your new Website > - > then just put whatever code you need to handle the request in there. > > Like I said, there is more than one way to do this, but this way > probably > saves you entering all the "known" domains you might be using, then > driving the "unknown" domains (and IP traffic) to an empty site. The > logic (for me anyway) is clearer with my first suggestion. > > Hope this helps. Cheers.... > > Scott Cadillac, > 403-281-6090 ~ [EMAIL PROTECTED] > ------------ > XML-Extranet ~ http://xmlx.ca ~ http://forums.xmlx.ca > Well-formed Programming in C# .NET, Witango, MSIE and XML > ------------ > Witango ~ http://witango.org > EasyXSLT ~ http://easyxslt.ca > IIS Watcher ~ http://iiswatcher.ca > ------------ > > > -----Original Message----- > From: "Fogelson, Steve" <[EMAIL PROTECTED]> > To: "'[EMAIL PROTECTED]'" <[EMAIL PROTECTED]> > Date: Wed, 11 Feb 2004 13:14:33 -0600 > Subject: RE: Witango-Talk: requests for ip address vs. domain names > > > Scott, > > > > Sorry about that. I am running Windows 2003 Web Edition, Witango 5. > > > > Thanks > > > > Steve > > > > -----Original Message----- > > From: Scott Cadillac [mailto:[EMAIL PROTECTED] > > Sent: Wednesday, February 11, 2004 12:23 PM > > To: [EMAIL PROTECTED] > > Subject: Re: Witango-Talk: requests for ip address vs. domain names > > > > > > Hi Steve, > > > > The exact solution will depend highly on what kind of Webserver (and > > OS) > > you're running. Let us know, when you have a moment. > > > > Cheers.... > > > > > > -----Original Message----- > > From: "Fogelson, Steve" <[EMAIL PROTECTED]> > > To: "Witango User Group (E-mail)" <[EMAIL PROTECTED]> > > Date: Wed, 11 Feb 2004 12:05:46 -0600 > > Subject: Witango-Talk: requests for ip address vs. domain names > > > > > I had something interesting happen to me the last few days. I have > an > > > app > > > for many domains with one set of tafs with the usual table lookup > to > > > find > > > the site and set a user variable that points to custom variable for > > > that > > > domain. > > > > > > Well if someone tried to hit the site with an ip address instead of > > the > > > domain name, it would bypass dns and hit the web server. My TCF > then > > > tries > > > the table lookup and doesn't find it. It then corrupts all my > custom > > > variables. Probably some coding logic. So what I want to do is > > redirect > > > to a > > > "page not found" or something if the site is not found in the table > > > lookup. > > > I already have a 404.taf that redirects if the domain is valid and > > the > > > page > > > is missing. > > > > > > I imagine it may be search engine spiders or hackers sequentially > > > checking > > > ip addresses, so I would like the response back to be a traditional > > > server > > > error if a page is not found. > > > > > > Any suggestions? > > > > > > Steve Fogelson > > > Internet Commerce Solutions > > > > > > > > > > > > _______________________________________________________________________ > > > _ > > > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > > > > > _______________________________________________________________________ > > _ > > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > > > _______________________________________________________________________ > > _ > > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > > _______________________________________________________________________ > _ > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf > _______________________________________________________________________ > _ > TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf ________________________________________________________________________ TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf
