How do I get the hostname accessed by the user?

Asked by James H on 2009-04-07

How do I get the hostname accessed by the user? Maybe using the Host header?

Thanks,

James

Question information

Language:
English Edit question
Status:
Solved
For:
eCAP Edit question
Assignee:
No assignee Edit question
Solved by:
James H
Solved:
2009-04-10
Last query:
2009-04-10
Last reply:
2009-04-07
Kevin Hunter (hunteke) said : #1

Please provide more context. Are you inquiring about an HTTP interaction? What's your environment (e.g. Django, PHP, Ruby, ...)?

James H (jules-verne) said : #2

Hello,

Yes, HTTP interaction using Squid.

Thanks,

James

Alex Rousskov (rousskov) said : #3

You can use the Host header value and/or the host part of the request URL. It is often easier to use the Host header because it is required.

The two hosts might not match, depending on whether the eCAP host application enforces a match before your adapter is invoked.

HTH,

Alex.

James H (jules-verne) said : #4

Thanks