469,289 Members | 2,330 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,289 developers. It's quick & easy.

Request.ServerVariables("HTTP_HOST")

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
Jul 19 '05 #1
4 18108
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)
JT <an*******@discussions.microsoft.com> wrote in message
news:13*****************************@phx.gbl...
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

Jul 19 '05 #2
JT
because i haven't yet setup https on my webserver... smarty

-----Original Message-----
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)
JT <an*******@discussions.microsoft.com> wrote in message
news:13*****************************@phx.gbl...
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

.

Jul 19 '05 #3
hehe, good reason ;o)

Unfortunately, I've not got it on mine either, so can't tell you either way
:o\, 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)
JT <an*******@discussions.microsoft.com> wrote in message
news:12*****************************@phx.gbl...
because i haven't yet setup https on my webserver... smarty

-----Original Message-----
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)
JT <an*******@discussions.microsoft.com> wrote in message
news:13*****************************@phx.gbl...
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

.

Jul 19 '05 #4
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.
--

Ray at home
Microsoft ASP MVP
"JT" <an*******@discussions.microsoft.com> wrote in message
news:12*****************************@phx.gbl...
because i haven't yet setup https on my webserver... smarty

-----Original Message-----
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)
JT <an*******@discussions.microsoft.com> wrote in message
news:13*****************************@phx.gbl...
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

.

Jul 19 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by scottyman | last post: by
4 posts views Thread by k3pp0 | last post: by
1 post views Thread by CARIGAR | last post: by
reply views Thread by suresh191 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.