Hello Group,

What would be correct way to find out what domain name / URL was used to
get to a frontpage web site?

Example:

www.anyname1.com
www.anyname2.com
www.anyname3.com

would all point to the same website and I want to find out which one the
user used to get to the site.


Thanks

Fred

Re: Frontpage 2003 - Global.asa question by Kevin

Kevin
Mon Jul 12 16:49:12 CDT 2004

You can use JavaScript to parse the document.location property, which is the
URL, and use string manipulation to get the domain name, by parsing out the
string between the 2 dots.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Fred" <anonymous@discussions.microsoft.com> wrote in message
news:O5r8DKFaEHA.3244@TK2MSFTNGP12.phx.gbl...
> Hello Group,
>
> What would be correct way to find out what domain name / URL was used to
> get to a frontpage web site?
>
> Example:
>
> www.anyname1.com
> www.anyname2.com
> www.anyname3.com
>
> would all point to the same website and I want to find out which one the
> user used to get to the site.
>
>
> Thanks
>
> Fred
>
>
>



Re: Frontpage 2003 - Global.asa question by clintonG

clintonG
Mon Jul 12 18:45:40 CDT 2004

This person is obviously using ASP as noted by the mention of
the global.asa file. It is much easier to use ASP than JavaScript
for this task.

It must also be noted that quite frequently it is not possible to
determine how or from where somebody attempted to request a
page on a website. I'm not going to write a whole tutorial on this
but it is an indisputable fact.

Put this ASP into any page that uses an .asp file extension...

<% Dim sReferredFrom
sReferredFrom = Request.ServerVariables("HTTP_REFERER")
Response.Write(sReferredFrom)
%>

Note: when used as a variable in code the word 'referer' is and
must be spelled incorrectly.

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/





"Kevin Spencer" <kspencer@takempis.com> wrote in message
news:OpFdPpFaEHA.1152@TK2MSFTNGP09.phx.gbl...
> You can use JavaScript to parse the document.location property, which is the
> URL, and use string manipulation to get the domain name, by parsing out the
> string between the 2 dots.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Fred" <anonymous@discussions.microsoft.com> wrote in message
> news:O5r8DKFaEHA.3244@TK2MSFTNGP12.phx.gbl...
> > Hello Group,
> >
> > What would be correct way to find out what domain name / URL was used to
> > get to a frontpage web site?
> >
> > Example:
> >
> > www.anyname1.com
> > www.anyname2.com
> > www.anyname3.com
> >
> > would all point to the same website and I want to find out which one the
> > user used to get to the site.
> >
> >
> > Thanks
> >
> > Fred
> >
> >
> >
>
>



Re: Frontpage 2003 - Global.asa question by Fred

Fred
Mon Jul 12 21:57:06 CDT 2004

Thanks for your help on my question.

Yes. I'm trying to write a dynamic ASP website based on the URL/Domain name
the user used to get to the site.

What I had hoped to do is create a session variable "session('sitename')"
when the session is created based on the domain name and refer to
session('sitename') to vary the content on ASP pages.

Here's my thoughts in an example:

1) Register three domain names - www.joes-bookstore.com,
www.mikes-bookstore.com, www.sams-bookstore.com and have them all point to
the same website.

2) Build a dynamic bookstore website that uses ASP code to vary the page
content based on what domain name is being used.


Is this possible?

Thanks

Fred



"clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in message
news:OY95YpGaEHA.1508@TK2MSFTNGP09.phx.gbl...
> This person is obviously using ASP as noted by the mention of
> the global.asa file. It is much easier to use ASP than JavaScript
> for this task.
>
> It must also be noted that quite frequently it is not possible to
> determine how or from where somebody attempted to request a
> page on a website. I'm not going to write a whole tutorial on this
> but it is an indisputable fact.
>
> Put this ASP into any page that uses an .asp file extension...
>
> <% Dim sReferredFrom
> sReferredFrom = Request.ServerVariables("HTTP_REFERER")
> Response.Write(sReferredFrom)
> %>
>
> Note: when used as a variable in code the word 'referer' is and
> must be spelled incorrectly.
>
> --
> <%= Clinton Gallagher
> A/E/C Consulting, Web Design, e-Commerce Software Development
> Wauwatosa, Milwaukee County, Wisconsin USA
> NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> URL http://www.metromilwaukee.com/clintongallagher/
>
>
>
>
>
> "Kevin Spencer" <kspencer@takempis.com> wrote in message
> news:OpFdPpFaEHA.1152@TK2MSFTNGP09.phx.gbl...
> > You can use JavaScript to parse the document.location property, which is
the
> > URL, and use string manipulation to get the domain name, by parsing out
the
> > string between the 2 dots.
> >
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> >
> > "Fred" <anonymous@discussions.microsoft.com> wrote in message
> > news:O5r8DKFaEHA.3244@TK2MSFTNGP12.phx.gbl...
> > > Hello Group,
> > >
> > > What would be correct way to find out what domain name / URL was used
to
> > > get to a frontpage web site?
> > >
> > > Example:
> > >
> > > www.anyname1.com
> > > www.anyname2.com
> > > www.anyname3.com
> > >
> > > would all point to the same website and I want to find out which one
the
> > > user used to get to the site.
> > >
> > >
> > > Thanks
> > >
> > > Fred
> > >
> > >
> > >
> >
> >
>
>



Re: Frontpage 2003 - Global.asa question by Kevin

Kevin
Tue Jul 13 07:42:41 CDT 2004

Sure it's possible. Use Request.ServerVariables("SERVER_NAME") to get the
domain name that they requested from the HTTP headers sent by the browser.
You can then set your Session value and continue with whatever.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Fred" <unknown@unknown> wrote in message
news:OE5udUIaEHA.2516@TK2MSFTNGP10.phx.gbl...
> Thanks for your help on my question.
>
> Yes. I'm trying to write a dynamic ASP website based on the URL/Domain
name
> the user used to get to the site.
>
> What I had hoped to do is create a session variable "session('sitename')"
> when the session is created based on the domain name and refer to
> session('sitename') to vary the content on ASP pages.
>
> Here's my thoughts in an example:
>
> 1) Register three domain names - www.joes-bookstore.com,
> www.mikes-bookstore.com, www.sams-bookstore.com and have them all point to
> the same website.
>
> 2) Build a dynamic bookstore website that uses ASP code to vary the page
> content based on what domain name is being used.
>
>
> Is this possible?
>
> Thanks
>
> Fred
>
>
>
> "clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in
message
> news:OY95YpGaEHA.1508@TK2MSFTNGP09.phx.gbl...
> > This person is obviously using ASP as noted by the mention of
> > the global.asa file. It is much easier to use ASP than JavaScript
> > for this task.
> >
> > It must also be noted that quite frequently it is not possible to
> > determine how or from where somebody attempted to request a
> > page on a website. I'm not going to write a whole tutorial on this
> > but it is an indisputable fact.
> >
> > Put this ASP into any page that uses an .asp file extension...
> >
> > <% Dim sReferredFrom
> > sReferredFrom = Request.ServerVariables("HTTP_REFERER")
> > Response.Write(sReferredFrom)
> > %>
> >
> > Note: when used as a variable in code the word 'referer' is and
> > must be spelled incorrectly.
> >
> > --
> > <%= Clinton Gallagher
> > A/E/C Consulting, Web Design, e-Commerce Software Development
> > Wauwatosa, Milwaukee County, Wisconsin USA
> > NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> > URL http://www.metromilwaukee.com/clintongallagher/
> >
> >
> >
> >
> >
> > "Kevin Spencer" <kspencer@takempis.com> wrote in message
> > news:OpFdPpFaEHA.1152@TK2MSFTNGP09.phx.gbl...
> > > You can use JavaScript to parse the document.location property, which
is
> the
> > > URL, and use string manipulation to get the domain name, by parsing
out
> the
> > > string between the 2 dots.
> > >
> > > --
> > > HTH,
> > > Kevin Spencer
> > > .Net Developer
> > > Microsoft MVP
> > > Big things are made up
> > > of lots of little things.
> > >
> > > "Fred" <anonymous@discussions.microsoft.com> wrote in message
> > > news:O5r8DKFaEHA.3244@TK2MSFTNGP12.phx.gbl...
> > > > Hello Group,
> > > >
> > > > What would be correct way to find out what domain name / URL was
used
> to
> > > > get to a frontpage web site?
> > > >
> > > > Example:
> > > >
> > > > www.anyname1.com
> > > > www.anyname2.com
> > > > www.anyname3.com
> > > >
> > > > would all point to the same website and I want to find out which one
> the
> > > > user used to get to the site.
> > > >
> > > >
> > > > Thanks
> > > >
> > > > Fred
> > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Frontpage 2003 - Global.asa question by Fred

Fred
Tue Jul 13 08:05:27 CDT 2004

Kevin,

Excellent that's what I was looking for. Thanks for your help

Fred

"Kevin Spencer" <kspencer@takempis.com> wrote in message
news:%23rO$hcNaEHA.3988@tk2msftngp13.phx.gbl...
> Sure it's possible. Use Request.ServerVariables("SERVER_NAME") to get the
> domain name that they requested from the HTTP headers sent by the browser.
> You can then set your Session value and continue with whatever.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "Fred" <unknown@unknown> wrote in message
> news:OE5udUIaEHA.2516@TK2MSFTNGP10.phx.gbl...
> > Thanks for your help on my question.
> >
> > Yes. I'm trying to write a dynamic ASP website based on the URL/Domain
> name
> > the user used to get to the site.
> >
> > What I had hoped to do is create a session variable
"session('sitename')"
> > when the session is created based on the domain name and refer to
> > session('sitename') to vary the content on ASP pages.
> >
> > Here's my thoughts in an example:
> >
> > 1) Register three domain names - www.joes-bookstore.com,
> > www.mikes-bookstore.com, www.sams-bookstore.com and have them all point
to
> > the same website.
> >
> > 2) Build a dynamic bookstore website that uses ASP code to vary the page
> > content based on what domain name is being used.
> >
> >
> > Is this possible?
> >
> > Thanks
> >
> > Fred
> >
> >
> >
> > "clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in
> message
> > news:OY95YpGaEHA.1508@TK2MSFTNGP09.phx.gbl...
> > > This person is obviously using ASP as noted by the mention of
> > > the global.asa file. It is much easier to use ASP than JavaScript
> > > for this task.
> > >
> > > It must also be noted that quite frequently it is not possible to
> > > determine how or from where somebody attempted to request a
> > > page on a website. I'm not going to write a whole tutorial on this
> > > but it is an indisputable fact.
> > >
> > > Put this ASP into any page that uses an .asp file extension...
> > >
> > > <% Dim sReferredFrom
> > > sReferredFrom = Request.ServerVariables("HTTP_REFERER")
> > > Response.Write(sReferredFrom)
> > > %>
> > >
> > > Note: when used as a variable in code the word 'referer' is and
> > > must be spelled incorrectly.
> > >
> > > --
> > > <%= Clinton Gallagher
> > > A/E/C Consulting, Web Design, e-Commerce Software Development
> > > Wauwatosa, Milwaukee County, Wisconsin USA
> > > NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> > > URL http://www.metromilwaukee.com/clintongallagher/
> > >
> > >
> > >
> > >
> > >
> > > "Kevin Spencer" <kspencer@takempis.com> wrote in message
> > > news:OpFdPpFaEHA.1152@TK2MSFTNGP09.phx.gbl...
> > > > You can use JavaScript to parse the document.location property,
which
> is
> > the
> > > > URL, and use string manipulation to get the domain name, by parsing
> out
> > the
> > > > string between the 2 dots.
> > > >
> > > > --
> > > > HTH,
> > > > Kevin Spencer
> > > > .Net Developer
> > > > Microsoft MVP
> > > > Big things are made up
> > > > of lots of little things.
> > > >
> > > > "Fred" <anonymous@discussions.microsoft.com> wrote in message
> > > > news:O5r8DKFaEHA.3244@TK2MSFTNGP12.phx.gbl...
> > > > > Hello Group,
> > > > >
> > > > > What would be correct way to find out what domain name / URL was
> used
> > to
> > > > > get to a frontpage web site?
> > > > >
> > > > > Example:
> > > > >
> > > > > www.anyname1.com
> > > > > www.anyname2.com
> > > > > www.anyname3.com
> > > > >
> > > > > would all point to the same website and I want to find out which
one
> > the
> > > > > user used to get to the site.
> > > > >
> > > > >
> > > > > Thanks
> > > > >
> > > > > Fred
> > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Frontpage 2003 - Global.asa question by clintonG

clintonG
Tue Jul 13 11:38:28 CDT 2004

Except I've already noted that there are several reasons why
this tactic is not reliable. Briefly, there are about 3-5 reasons
why the request object will never contain any data regardless
of what server variable is used.

Don't forget to include such shortcoming in your design strategy.
Maybe Kevin can take his time to confirm this as he seems to
have conveniently forgotten. :-)

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/


"Fred" <anonymous@discussions.microsoft.com> wrote in message
news:uf2s7nNaEHA.3508@TK2MSFTNGP09.phx.gbl...
> Kevin,
>
> Excellent that's what I was looking for. Thanks for your help
>
> Fred
>
> "Kevin Spencer" <kspencer@takempis.com> wrote in message
> news:%23rO$hcNaEHA.3988@tk2msftngp13.phx.gbl...
> > Sure it's possible. Use Request.ServerVariables("SERVER_NAME") to get the
> > domain name that they requested from the HTTP headers sent by the browser.
> > You can then set your Session value and continue with whatever.
> >
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> >
> > "Fred" <unknown@unknown> wrote in message
> > news:OE5udUIaEHA.2516@TK2MSFTNGP10.phx.gbl...
> > > Thanks for your help on my question.
> > >
> > > Yes. I'm trying to write a dynamic ASP website based on the URL/Domain
> > name
> > > the user used to get to the site.
> > >
> > > What I had hoped to do is create a session variable
> "session('sitename')"
> > > when the session is created based on the domain name and refer to
> > > session('sitename') to vary the content on ASP pages.
> > >
> > > Here's my thoughts in an example:
> > >
> > > 1) Register three domain names - www.joes-bookstore.com,
> > > www.mikes-bookstore.com, www.sams-bookstore.com and have them all point
> to
> > > the same website.
> > >
> > > 2) Build a dynamic bookstore website that uses ASP code to vary the page
> > > content based on what domain name is being used.
> > >
> > >
> > > Is this possible?
> > >
> > > Thanks
> > >
> > > Fred
> > >
> > >
> > >
> > > "clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in
> > message
> > > news:OY95YpGaEHA.1508@TK2MSFTNGP09.phx.gbl...
> > > > This person is obviously using ASP as noted by the mention of
> > > > the global.asa file. It is much easier to use ASP than JavaScript
> > > > for this task.
> > > >
> > > > It must also be noted that quite frequently it is not possible to
> > > > determine how or from where somebody attempted to request a
> > > > page on a website. I'm not going to write a whole tutorial on this
> > > > but it is an indisputable fact.
> > > >
> > > > Put this ASP into any page that uses an .asp file extension...
> > > >
> > > > <% Dim sReferredFrom
> > > > sReferredFrom = Request.ServerVariables("HTTP_REFERER")
> > > > Response.Write(sReferredFrom)
> > > > %>
> > > >
> > > > Note: when used as a variable in code the word 'referer' is and
> > > > must be spelled incorrectly.
> > > >
> > > > --
> > > > <%= Clinton Gallagher
> > > > A/E/C Consulting, Web Design, e-Commerce Software Development
> > > > Wauwatosa, Milwaukee County, Wisconsin USA
> > > > NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> > > > URL http://www.metromilwaukee.com/clintongallagher/
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "Kevin Spencer" <kspencer@takempis.com> wrote in message
> > > > news:OpFdPpFaEHA.1152@TK2MSFTNGP09.phx.gbl...
> > > > > You can use JavaScript to parse the document.location property,
> which
> > is
> > > the
> > > > > URL, and use string manipulation to get the domain name, by parsing
> > out
> > > the
> > > > > string between the 2 dots.
> > > > >
> > > > > --
> > > > > HTH,
> > > > > Kevin Spencer
> > > > > .Net Developer
> > > > > Microsoft MVP
> > > > > Big things are made up
> > > > > of lots of little things.
> > > > >
> > > > > "Fred" <anonymous@discussions.microsoft.com> wrote in message
> > > > > news:O5r8DKFaEHA.3244@TK2MSFTNGP12.phx.gbl...
> > > > > > Hello Group,
> > > > > >
> > > > > > What would be correct way to find out what domain name / URL was
> > used
> > > to
> > > > > > get to a frontpage web site?
> > > > > >
> > > > > > Example:
> > > > > >
> > > > > > www.anyname1.com
> > > > > > www.anyname2.com
> > > > > > www.anyname3.com
> > > > > >
> > > > > > would all point to the same website and I want to find out which
> one
> > > the
> > > > > > user used to get to the site.
> > > > > >
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Fred
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Frontpage 2003 - Global.asa question by Kevin

Kevin
Tue Jul 13 13:14:06 CDT 2004

I haven't forgotten anything. I used this very technique in a similar
situation several years ago, with a client who just sold his web site for
600K.

If the user enters an IP address instead of a domain name (unlikely, but
possible), it will be necessary to have a default web site from one of the
domain names available. Other than that, it's no problemo.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in message
news:#SwxVfPaEHA.2340@TK2MSFTNGP09.phx.gbl...
> Except I've already noted that there are several reasons why
> this tactic is not reliable. Briefly, there are about 3-5 reasons
> why the request object will never contain any data regardless
> of what server variable is used.
>
> Don't forget to include such shortcoming in your design strategy.
> Maybe Kevin can take his time to confirm this as he seems to
> have conveniently forgotten. :-)
>
> --
> <%= Clinton Gallagher
> A/E/C Consulting, Web Design, e-Commerce Software Development
> Wauwatosa, Milwaukee County, Wisconsin USA
> NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> URL http://www.metromilwaukee.com/clintongallagher/
>
>
> "Fred" <anonymous@discussions.microsoft.com> wrote in message
> news:uf2s7nNaEHA.3508@TK2MSFTNGP09.phx.gbl...
> > Kevin,
> >
> > Excellent that's what I was looking for. Thanks for your help
> >
> > Fred
> >
> > "Kevin Spencer" <kspencer@takempis.com> wrote in message
> > news:%23rO$hcNaEHA.3988@tk2msftngp13.phx.gbl...
> > > Sure it's possible. Use Request.ServerVariables("SERVER_NAME") to get
the
> > > domain name that they requested from the HTTP headers sent by the
browser.
> > > You can then set your Session value and continue with whatever.
> > >
> > > --
> > > HTH,
> > > Kevin Spencer
> > > .Net Developer
> > > Microsoft MVP
> > > Big things are made up
> > > of lots of little things.
> > >
> > > "Fred" <unknown@unknown> wrote in message
> > > news:OE5udUIaEHA.2516@TK2MSFTNGP10.phx.gbl...
> > > > Thanks for your help on my question.
> > > >
> > > > Yes. I'm trying to write a dynamic ASP website based on the
URL/Domain
> > > name
> > > > the user used to get to the site.
> > > >
> > > > What I had hoped to do is create a session variable
> > "session('sitename')"
> > > > when the session is created based on the domain name and refer to
> > > > session('sitename') to vary the content on ASP pages.
> > > >
> > > > Here's my thoughts in an example:
> > > >
> > > > 1) Register three domain names - www.joes-bookstore.com,
> > > > www.mikes-bookstore.com, www.sams-bookstore.com and have them all
point
> > to
> > > > the same website.
> > > >
> > > > 2) Build a dynamic bookstore website that uses ASP code to vary the
page
> > > > content based on what domain name is being used.
> > > >
> > > >
> > > > Is this possible?
> > > >
> > > > Thanks
> > > >
> > > > Fred
> > > >
> > > >
> > > >
> > > > "clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in
> > > message
> > > > news:OY95YpGaEHA.1508@TK2MSFTNGP09.phx.gbl...
> > > > > This person is obviously using ASP as noted by the mention of
> > > > > the global.asa file. It is much easier to use ASP than JavaScript
> > > > > for this task.
> > > > >
> > > > > It must also be noted that quite frequently it is not possible to
> > > > > determine how or from where somebody attempted to request a
> > > > > page on a website. I'm not going to write a whole tutorial on this
> > > > > but it is an indisputable fact.
> > > > >
> > > > > Put this ASP into any page that uses an .asp file extension...
> > > > >
> > > > > <% Dim sReferredFrom
> > > > > sReferredFrom =
Request.ServerVariables("HTTP_REFERER")
> > > > > Response.Write(sReferredFrom)
> > > > > %>
> > > > >
> > > > > Note: when used as a variable in code the word 'referer' is and
> > > > > must be spelled incorrectly.
> > > > >
> > > > > --
> > > > > <%= Clinton Gallagher
> > > > > A/E/C Consulting, Web Design, e-Commerce Software
Development
> > > > > Wauwatosa, Milwaukee County, Wisconsin USA
> > > > > NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> > > > > URL http://www.metromilwaukee.com/clintongallagher/
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > "Kevin Spencer" <kspencer@takempis.com> wrote in message
> > > > > news:OpFdPpFaEHA.1152@TK2MSFTNGP09.phx.gbl...
> > > > > > You can use JavaScript to parse the document.location property,
> > which
> > > is
> > > > the
> > > > > > URL, and use string manipulation to get the domain name, by
parsing
> > > out
> > > > the
> > > > > > string between the 2 dots.
> > > > > >
> > > > > > --
> > > > > > HTH,
> > > > > > Kevin Spencer
> > > > > > .Net Developer
> > > > > > Microsoft MVP
> > > > > > Big things are made up
> > > > > > of lots of little things.
> > > > > >
> > > > > > "Fred" <anonymous@discussions.microsoft.com> wrote in message
> > > > > > news:O5r8DKFaEHA.3244@TK2MSFTNGP12.phx.gbl...
> > > > > > > Hello Group,
> > > > > > >
> > > > > > > What would be correct way to find out what domain name / URL
was
> > > used
> > > > to
> > > > > > > get to a frontpage web site?
> > > > > > >
> > > > > > > Example:
> > > > > > >
> > > > > > > www.anyname1.com
> > > > > > > www.anyname2.com
> > > > > > > www.anyname3.com
> > > > > > >
> > > > > > > would all point to the same website and I want to find out
which
> > one
> > > > the
> > > > > > > user used to get to the site.
> > > > > > >
> > > > > > >
> > > > > > > Thanks
> > > > > > >
> > > > > > > Fred
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Frontpage 2003 - Global.asa question by clintonG

clintonG
Tue Jul 13 20:24:47 CDT 2004

I wish I could meet a client that would pay me to spread the manure.

I am pointing out -- as I did in my first reply -- that this technique we
are discussing -- using the Request object to capture data in the server
variables collection -- is not reliable -- and if it is to be used, the design
of the code should include some form of responding to the several
instances why the server variables may never be populated with data
and in fact the business strategy itself must be considered to even
use this methodology as there may be other ways to skin the cat.

I'm not going to repeat myself again.

What you had to say about the IP address is incorrect. Requesting a
page by using an IP address is easy enough to capture in code when
using the Request object unless of course one of the several points
of failure are involved.

Manually typing the URL into the address bar is in fact one of several
instances why the Request object will not be populated with data and it
would not matter if what was manually entered was an IP address or
a well formed URL. Loading a page from Favorites is another. There
are others.

Assuming you are technically competent, you would have learned this by
trial and error or by study -- eventually -- but why you choose to spread
the manure and care not enough to even make a simple comment warning
about this fact while trying to 'help' a neophyte remains between you and
your maker and anybody foolish enough to trust that kind of 'advice.'

--
<%= Clinton Gallagher
A/E/C Consulting, Web Design, e-Commerce Software Development
Wauwatosa, Milwaukee County, Wisconsin USA
NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
URL http://www.metromilwaukee.com/clintongallagher/



"Kevin Spencer" <kspencer@takempis.com> wrote in message
news:OgnduVQaEHA.2408@tk2msftngp13.phx.gbl...
> I haven't forgotten anything. I used this very technique in a similar
> situation several years ago, with a client who just sold his web site for
> 600K.
>
> If the user enters an IP address instead of a domain name (unlikely, but
> possible), it will be necessary to have a default web site from one of the
> domain names available. Other than that, it's no problemo.
>
> --
> HTH,
> Kevin Spencer
> .Net Developer
> Microsoft MVP
> Big things are made up
> of lots of little things.
>
> "clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in message
> news:#SwxVfPaEHA.2340@TK2MSFTNGP09.phx.gbl...
> > Except I've already noted that there are several reasons why
> > this tactic is not reliable. Briefly, there are about 3-5 reasons
> > why the request object will never contain any data regardless
> > of what server variable is used.
> >
> > Don't forget to include such shortcoming in your design strategy.
> > Maybe Kevin can take his time to confirm this as he seems to
> > have conveniently forgotten. :-)
> >
> > --
> > <%= Clinton Gallagher
> > A/E/C Consulting, Web Design, e-Commerce Software Development
> > Wauwatosa, Milwaukee County, Wisconsin USA
> > NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> > URL http://www.metromilwaukee.com/clintongallagher/
> >
> >
> > "Fred" <anonymous@discussions.microsoft.com> wrote in message
> > news:uf2s7nNaEHA.3508@TK2MSFTNGP09.phx.gbl...
> > > Kevin,
> > >
> > > Excellent that's what I was looking for. Thanks for your help
> > >
> > > Fred
> > >
> > > "Kevin Spencer" <kspencer@takempis.com> wrote in message
> > > news:%23rO$hcNaEHA.3988@tk2msftngp13.phx.gbl...
> > > > Sure it's possible. Use Request.ServerVariables("SERVER_NAME") to get
> the
> > > > domain name that they requested from the HTTP headers sent by the
> browser.
> > > > You can then set your Session value and continue with whatever.
> > > >
> > > > --
> > > > HTH,
> > > > Kevin Spencer
> > > > .Net Developer
> > > > Microsoft MVP
> > > > Big things are made up
> > > > of lots of little things.
> > > >
> > > > "Fred" <unknown@unknown> wrote in message
> > > > news:OE5udUIaEHA.2516@TK2MSFTNGP10.phx.gbl...
> > > > > Thanks for your help on my question.
> > > > >
> > > > > Yes. I'm trying to write a dynamic ASP website based on the
> URL/Domain
> > > > name
> > > > > the user used to get to the site.
> > > > >
> > > > > What I had hoped to do is create a session variable
> > > "session('sitename')"
> > > > > when the session is created based on the domain name and refer to
> > > > > session('sitename') to vary the content on ASP pages.
> > > > >
> > > > > Here's my thoughts in an example:
> > > > >
> > > > > 1) Register three domain names - www.joes-bookstore.com,
> > > > > www.mikes-bookstore.com, www.sams-bookstore.com and have them all
> point
> > > to
> > > > > the same website.
> > > > >
> > > > > 2) Build a dynamic bookstore website that uses ASP code to vary the
> page
> > > > > content based on what domain name is being used.
> > > > >
> > > > >
> > > > > Is this possible?
> > > > >
> > > > > Thanks
> > > > >
> > > > > Fred
> > > > >
> > > > >
> > > > >
> > > > > "clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in
> > > > message
> > > > > news:OY95YpGaEHA.1508@TK2MSFTNGP09.phx.gbl...
> > > > > > This person is obviously using ASP as noted by the mention of
> > > > > > the global.asa file. It is much easier to use ASP than JavaScript
> > > > > > for this task.
> > > > > >
> > > > > > It must also be noted that quite frequently it is not possible to
> > > > > > determine how or from where somebody attempted to request a
> > > > > > page on a website. I'm not going to write a whole tutorial on this
> > > > > > but it is an indisputable fact.
> > > > > >
> > > > > > Put this ASP into any page that uses an .asp file extension...
> > > > > >
> > > > > > <% Dim sReferredFrom
> > > > > > sReferredFrom =
> Request.ServerVariables("HTTP_REFERER")
> > > > > > Response.Write(sReferredFrom)
> > > > > > %>
> > > > > >
> > > > > > Note: when used as a variable in code the word 'referer' is and
> > > > > > must be spelled incorrectly.
> > > > > >
> > > > > > --
> > > > > > <%= Clinton Gallagher
> > > > > > A/E/C Consulting, Web Design, e-Commerce Software
> Development
> > > > > > Wauwatosa, Milwaukee County, Wisconsin USA
> > > > > > NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> > > > > > URL http://www.metromilwaukee.com/clintongallagher/
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > >
> > > > > > "Kevin Spencer" <kspencer@takempis.com> wrote in message
> > > > > > news:OpFdPpFaEHA.1152@TK2MSFTNGP09.phx.gbl...
> > > > > > > You can use JavaScript to parse the document.location property,
> > > which
> > > > is
> > > > > the
> > > > > > > URL, and use string manipulation to get the domain name, by
> parsing
> > > > out
> > > > > the
> > > > > > > string between the 2 dots.
> > > > > > >
> > > > > > > --
> > > > > > > HTH,
> > > > > > > Kevin Spencer
> > > > > > > .Net Developer
> > > > > > > Microsoft MVP
> > > > > > > Big things are made up
> > > > > > > of lots of little things.
> > > > > > >
> > > > > > > "Fred" <anonymous@discussions.microsoft.com> wrote in message
> > > > > > > news:O5r8DKFaEHA.3244@TK2MSFTNGP12.phx.gbl...
> > > > > > > > Hello Group,
> > > > > > > >
> > > > > > > > What would be correct way to find out what domain name / URL
> was
> > > > used
> > > > > to
> > > > > > > > get to a frontpage web site?
> > > > > > > >
> > > > > > > > Example:
> > > > > > > >
> > > > > > > > www.anyname1.com
> > > > > > > > www.anyname2.com
> > > > > > > > www.anyname3.com
> > > > > > > >
> > > > > > > > would all point to the same website and I want to find out
> which
> > > one
> > > > > the
> > > > > > > > user used to get to the site.
> > > > > > > >
> > > > > > > >
> > > > > > > > Thanks
> > > > > > > >
> > > > > > > > Fred
> > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>



Re: Frontpage 2003 - Global.asa question by Kevin

Kevin
Wed Jul 14 07:01:09 CDT 2004

I speak not only from experience, but from knowledge. I have used ASP since
it first appeared, and have authored books and articles on the subject of
ASP. While criticising my advice, you bring up no actual facts or data, only
innuendo. You obviously are not here to help, but with your own agenda, one
that doesn't serve anyone but yourself.

However, for the benefit of others, I will answer your innuendo: The Request
object is simply an object made up of the various text elements of an HTTP
Request. The ASP Request.ServerVariables Collection is derived by parsing
the Request and the headers in it. In the case of
Request.ServerVariables("SERVER_NAME"), the value in the Collection is the
domain name of the path requested by the browser. For example, if you
request http://www.microsoft.com/default.asp, "microsoft.com" is the domain
name portion of the Requested URL. EVERY REQUEST includes either a domain
name, machine name, or an IP address. This variable will NEVER be empty.

What you are ignorantly proclaiming is in relation to
Request.ServerVariables("HTTP_REFERER"), which will indeed be empty if the
browser was just opened, and the URL was either typed in, or a favorite was
used, as the HTTP_REFERER is the URL of the page that linked to the current
one to bring the browser there.

The blanket statement "several instances why the server variables may never
be populated with data" indicates that there are instances where NO Server
Variables will be populated with data. If you knew what they were, you would
know how ridiculous that assertion is.

--
HTH,
Kevin Spencer
.Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in message
news:O4vAcFUaEHA.3016@tk2msftngp13.phx.gbl...
> I wish I could meet a client that would pay me to spread the manure.
>
> I am pointing out -- as I did in my first reply -- that this technique we
> are discussing -- using the Request object to capture data in the server
> variables collection -- is not reliable -- and if it is to be used, the
design
> of the code should include some form of responding to the several
> instances why the server variables may never be populated with data
> and in fact the business strategy itself must be considered to even
> use this methodology as there may be other ways to skin the cat.
>
> I'm not going to repeat myself again.
>
> What you had to say about the IP address is incorrect. Requesting a
> page by using an IP address is easy enough to capture in code when
> using the Request object unless of course one of the several points
> of failure are involved.
>
> Manually typing the URL into the address bar is in fact one of several
> instances why the Request object will not be populated with data and it
> would not matter if what was manually entered was an IP address or
> a well formed URL. Loading a page from Favorites is another. There
> are others.
>
> Assuming you are technically competent, you would have learned this by
> trial and error or by study -- eventually -- but why you choose to spread
> the manure and care not enough to even make a simple comment warning
> about this fact while trying to 'help' a neophyte remains between you and
> your maker and anybody foolish enough to trust that kind of 'advice.'
>
> --
> <%= Clinton Gallagher
> A/E/C Consulting, Web Design, e-Commerce Software Development
> Wauwatosa, Milwaukee County, Wisconsin USA
> NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> URL http://www.metromilwaukee.com/clintongallagher/
>
>
>
> "Kevin Spencer" <kspencer@takempis.com> wrote in message
> news:OgnduVQaEHA.2408@tk2msftngp13.phx.gbl...
> > I haven't forgotten anything. I used this very technique in a similar
> > situation several years ago, with a client who just sold his web site
for
> > 600K.
> >
> > If the user enters an IP address instead of a domain name (unlikely, but
> > possible), it will be necessary to have a default web site from one of
the
> > domain names available. Other than that, it's no problemo.
> >
> > --
> > HTH,
> > Kevin Spencer
> > .Net Developer
> > Microsoft MVP
> > Big things are made up
> > of lots of little things.
> >
> > "clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote in
message
> > news:#SwxVfPaEHA.2340@TK2MSFTNGP09.phx.gbl...
> > > Except I've already noted that there are several reasons why
> > > this tactic is not reliable. Briefly, there are about 3-5 reasons
> > > why the request object will never contain any data regardless
> > > of what server variable is used.
> > >
> > > Don't forget to include such shortcoming in your design strategy.
> > > Maybe Kevin can take his time to confirm this as he seems to
> > > have conveniently forgotten. :-)
> > >
> > > --
> > > <%= Clinton Gallagher
> > > A/E/C Consulting, Web Design, e-Commerce Software Development
> > > Wauwatosa, Milwaukee County, Wisconsin USA
> > > NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> > > URL http://www.metromilwaukee.com/clintongallagher/
> > >
> > >
> > > "Fred" <anonymous@discussions.microsoft.com> wrote in message
> > > news:uf2s7nNaEHA.3508@TK2MSFTNGP09.phx.gbl...
> > > > Kevin,
> > > >
> > > > Excellent that's what I was looking for. Thanks for your help
> > > >
> > > > Fred
> > > >
> > > > "Kevin Spencer" <kspencer@takempis.com> wrote in message
> > > > news:%23rO$hcNaEHA.3988@tk2msftngp13.phx.gbl...
> > > > > Sure it's possible. Use Request.ServerVariables("SERVER_NAME") to
get
> > the
> > > > > domain name that they requested from the HTTP headers sent by the
> > browser.
> > > > > You can then set your Session value and continue with whatever.
> > > > >
> > > > > --
> > > > > HTH,
> > > > > Kevin Spencer
> > > > > .Net Developer
> > > > > Microsoft MVP
> > > > > Big things are made up
> > > > > of lots of little things.
> > > > >
> > > > > "Fred" <unknown@unknown> wrote in message
> > > > > news:OE5udUIaEHA.2516@TK2MSFTNGP10.phx.gbl...
> > > > > > Thanks for your help on my question.
> > > > > >
> > > > > > Yes. I'm trying to write a dynamic ASP website based on the
> > URL/Domain
> > > > > name
> > > > > > the user used to get to the site.
> > > > > >
> > > > > > What I had hoped to do is create a session variable
> > > > "session('sitename')"
> > > > > > when the session is created based on the domain name and refer
to
> > > > > > session('sitename') to vary the content on ASP pages.
> > > > > >
> > > > > > Here's my thoughts in an example:
> > > > > >
> > > > > > 1) Register three domain names - www.joes-bookstore.com,
> > > > > > www.mikes-bookstore.com, www.sams-bookstore.com and have them
all
> > point
> > > > to
> > > > > > the same website.
> > > > > >
> > > > > > 2) Build a dynamic bookstore website that uses ASP code to vary
the
> > page
> > > > > > content based on what domain name is being used.
> > > > > >
> > > > > >
> > > > > > Is this possible?
> > > > > >
> > > > > > Thanks
> > > > > >
> > > > > > Fred
> > > > > >
> > > > > >
> > > > > >
> > > > > > "clintonG" <csgallagher@REMOVETHISTEXT@metromilwaukee.com> wrote
in
> > > > > message
> > > > > > news:OY95YpGaEHA.1508@TK2MSFTNGP09.phx.gbl...
> > > > > > > This person is obviously using ASP as noted by the mention of
> > > > > > > the global.asa file. It is much easier to use ASP than
JavaScript
> > > > > > > for this task.
> > > > > > >
> > > > > > > It must also be noted that quite frequently it is not possible
to
> > > > > > > determine how or from where somebody attempted to request a
> > > > > > > page on a website. I'm not going to write a whole tutorial on
this
> > > > > > > but it is an indisputable fact.
> > > > > > >
> > > > > > > Put this ASP into any page that uses an .asp file extension...
> > > > > > >
> > > > > > > <% Dim sReferredFrom
> > > > > > > sReferredFrom =
> > Request.ServerVariables("HTTP_REFERER")
> > > > > > > Response.Write(sReferredFrom)
> > > > > > > %>
> > > > > > >
> > > > > > > Note: when used as a variable in code the word 'referer' is
and
> > > > > > > must be spelled incorrectly.
> > > > > > >
> > > > > > > --
> > > > > > > <%= Clinton Gallagher
> > > > > > > A/E/C Consulting, Web Design, e-Commerce Software
> > Development
> > > > > > > Wauwatosa, Milwaukee County, Wisconsin USA
> > > > > > > NET csgallagher@ REMOVETHISTEXT metromilwaukee.com
> > > > > > > URL http://www.metromilwaukee.com/clintongallagher/
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > "Kevin Spencer" <kspencer@takempis.com> wrote in message
> > > > > > > news:OpFdPpFaEHA.1152@TK2MSFTNGP09.phx.gbl...
> > > > > > > > You can use JavaScript to parse the document.location
property,
> > > > which
> > > > > is
> > > > > > the
> > > > > > > > URL, and use string manipulation to get the domain name, by
> > parsing
> > > > > out
> > > > > > the
> > > > > > > > string between the 2 dots.
> > > > > > > >
> > > > > > > > --
> > > > > > > > HTH,
> > > > > > > > Kevin Spencer
> > > > > > > > .Net Developer
> > > > > > > > Microsoft MVP
> > > > > > > > Big things are made up
> > > > > > > > of lots of little things.
> > > > > > > >
> > > > > > > > "Fred" <anonymous@discussions.microsoft.com> wrote in
message
> > > > > > > > news:O5r8DKFaEHA.3244@TK2MSFTNGP12.phx.gbl...
> > > > > > > > > Hello Group,
> > > > > > > > >
> > > > > > > > > What would be correct way to find out what domain name /
URL
> > was
> > > > > used
> > > > > > to
> > > > > > > > > get to a frontpage web site?
> > > > > > > > >
> > > > > > > > > Example:
> > > > > > > > >
> > > > > > > > > www.anyname1.com
> > > > > > > > > www.anyname2.com
> > > > > > > > > www.anyname3.com
> > > > > > > > >
> > > > > > > > > would all point to the same website and I want to find out
> > which
> > > > one
> > > > > > the
> > > > > > > > > user used to get to the site.
> > > > > > > > >
> > > > > > > > >
> > > > > > > > > Thanks
> > > > > > > > >
> > > > > > > > > Fred
> > > > > > > > >
> > > > > > > > >
> > > > > > > > >
> > > > > > > >
> > > > > > > >
> > > > > > >
> > > > > > >
> > > > > >
> > > > > >
> > > > >
> > > > >
> > > >
> > > >
> > >
> > >
> >
> >
>
>