getting the real virtual host 
Author Message
 getting the real virtual host

I have a script which does different things depending on which domain the
user has accessed.
I've done this using virtual_host(), which is the same as $ENV{'HTTP_HOST'}.
The problem is that this relies on the browser putting the correct value in
the Host: header, and a significant number of browsers (/hackers/robots) do
not.
Is there any way of getting the real host that the user requested in order
to end up at my page?


Wed, 18 Jun 1902 08:00:00 GMT  
 getting the real virtual host

' Is there any way of getting the real host that the user requested in order
' to end up at my page?

If all your host names map to the same IP address then the answer is
no.  You need the Host header to determine which site is asked for.
In its absense, you can send back a default page, but that is about it.

--
David Steuber | Perl apprentice.  The axe did not stop the
NRA Member    | mops and buckets from flooding my home.
ICQ# 91465842
***         http://www.david-steuber.com/          ***



Wed, 18 Jun 1902 08:00:00 GMT  
 getting the real virtual host
I figured that might be the case. Thanks for the answer.


Quote:

> ' Is there any way of getting the real host that the user requested in
order
> ' to end up at my page?

> If all your host names map to the same IP address then the answer is
> no.  You need the Host header to determine which site is asked for.
> In its absense, you can send back a default page, but that is about it.

> --
> David Steuber | Perl apprentice.  The axe did not stop the
> NRA Member    | mops and buckets from flooding my home.
> ICQ# 91465842
> ***         http://www.david-steuber.com/          ***



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 3 post ] 

 Relevant Pages 

1. Getting mod_perl working under mod_ssl virtual host

2. getting the virtual host info...

3. To all Virtual Hosting Company (URGENT HOST WANTED)

4. Free: Make 3D scan from real object to virtual object

5. Free: Make 3D scan from real object to virtual object

6. Free: Make 3D scan from real object to virtual object

7. Host your WEB DESIGNS and organize WEB OFFICES with our Virtual Servers

8. mod_perl, apache, virtual host problem

9. McGraw-Hill Education Examines Career Readiness Issues, Hosts 21st Century Workforce Virtual Conference

10. perl virtual hosts

11. Log rotator script for virtual hosting

12. mod_perl virtual web hosting?

 

 
Powered by phpBB® Forum Software