This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

internal or external request.

 
hasan khan
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my website can be access at http://www.mydomain.com/mycontext/ by external users and
we the internal user can also access the web site by using some internal ip : http://10.20.30.40/mycontext/

how do i distinguish wheater the request has come from internal or external.
[ June 14, 2006: Message edited by: hasaN khaN ]
 
Darren Edwards
Ranch Hand
Posts: 69
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Use the Host header from HTTP (assuming you are using HTTP1.1, but most people are!)

 
hasan khan
Ranch Hand
Posts: 223
Eclipse IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i know about host header, but i want to distinguish between domain name or IP is coming in the host header.
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Read the header.
If it contains your domain name, you know the requests was from your domain name.
If it contains the IP number, then you know it came from the IP number.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic