in reply to (dkubb) Re: (2) to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.
in thread to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.
The Host header (read $ENV{"HTTP_HOST"}) which is manditory for HTTP/1.1 (and IIRC also for HTTP/1.0) specifies the host name for the request; this was designed specifically for "virtual hosting".
If you already have a CGI object floating about, then I'd recommend using $cgi->virtual_host. If you don't, it's probably easier to just use $ENV{"HTTP_HOST"}
--
RatArsed
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: (2) to $Env{'HTTP_HOST'} or to $Env{'SERVER_NAME'}, that is the question.
by Anonymous Monk on Oct 13, 2020 at 07:46 UTC |