Request.ServerVariables("HTTP_HOST")

J

JT

if i am using https, will this work the same as if i were
using http?

Request.ServerVariables("HTTP_HOST")

returns www.mywebsite.net for http.

what about https?????


thanks much

jt
 
S

Steven Burn

Why not just try it and see?

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
S

Steven Burn

hehe, good reason ;o)

Unfortunately, I've not got it on mine either, so can't tell you either way
:eek:\, though, from what my host tells me, if it's a secure site, the
HTTP_HOST will not be passed onto the referring page.

--
Regards

Steven Burn
Ur I.T. Mate Group
www.it-mate.co.uk

Keeping it FREE!

Disclaimer:
I know I'm probably wrong, I just like taking part ;o)
 
R

Ray at

It returns the same thing. Note that this variable is not reliable, in that
a person can make that variable be whatever he wants it to be. Example:


yourpage.asp:
<%
Response.Write Request.ServerVariables("HTTP_HOST") & " or " &
Request.ServerVariables("SERVER_NAME")
%>

Load that page and see the results. Then, open a command prompt (cmd.exe)
and enter this:

(Where xxx.xxx.xxx.xxx is your site's IP address)

echo xxx.xxx.xxx.xxx bogus>>%windir%\system32\drivers\etc\hosts

Now load http://bogus/yourpage.asp in your browser.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,767
Messages
2,569,570
Members
45,045
Latest member
DRCM

Latest Threads

Top