473,545 Members | 2,663 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Request.ServerV ariables("HTTP_ HOST")

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

Request.ServerV ariables("HTTP_ HOST")

returns www.mywebsite.net for http.

what about https?????
thanks much

jt
Jul 19 '05 #1
4 18771
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*******@disc ussions.microso ft.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.ServerV ariables("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*******@disc ussions.microso ft.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.ServerV ariables("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*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.ServerV ariables("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.ServerV ariables("HTTP_ HOST") & " or " &
Request.ServerV ariables("SERVE R_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\drive rs\etc\hosts

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

Ray at home
Microsoft ASP MVP
"JT" <an*******@disc ussions.microso ft.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*******@disc ussions.microso ft.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.ServerV ariables("HTTP_ HOST")

returns www.mywebsite.net for http.

what about https?????
thanks much

jt

.

Jul 19 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
13383
by: David D. | last post by:
Does the file extension matter when including a JavaScript file in an HTML page? Normally, one would include a JavaScript file in an HTML page using <script src="foo.JS" type="text/javascript"> However, I have found that I can use an alternate file extension, such as <script src="foo.HTML" type="text/javascript"> It works fine with my...
2
4998
by: Trapulo | last post by:
I read Context.Request.ServerVariables("HTTP_HOST") from an asp.net page, but I've the problem that it returns always "localhost". I've tried to call the web site as http://server/site (server as netbios over tcp, not dns... in this net there isn't a dns ) http://ip/site from a remote pc, but nothing. I read always localhost. I've tried...
6
4849
by: scottyman | last post by:
I can't make this script work properly. I've gone as far as I can with it and the rest is out of my ability. I can do some html editing but I'm lost in the Java world. The script at the bottom of the html page controls the form fields that are required. It doesn't function like it's supposed to and I can leave all the fields blank and it still...
2
12499
by: E L | last post by:
We have the Request.ServerVariables("SERVER_NAME") used in a classic ASP page using IIS 6. It used to return our website name: www.xxx.name.this when using IIS 5, now it is returning the IP address when we type the full www. url. How can I fix this behavior? *** Sent via Developersdex http://www.developersdex.com ***
4
3276
by: k3pp0 | last post by:
Hey. I've got a very basic newbie question, I hope you can understand me. Sorry for asking it, first of all. I see a lot of sites (e.g. communities) with a url-structure like this: example.com/users/paul (displaying the user profile of "paul") or example.com/pictures/landscapes/13 (displaying pictures from the category "landscapes", page...
1
3928
by: news.microsoft.com | last post by:
I am getting the following error on the return from a function call.It specically happens on the assignment of the return value from the function call. No error happens inside the function. The function is returning an Integer with a value of 1. Err.number =5 Err.Description=Operation is not supported on this platform....
0
7490
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
0
7682
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
7935
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7449
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7780
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6009
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5069
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3479
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3465
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.