Redirection help needed. 
Author Message
 Redirection help needed.

I need help with a redirection issue. I'm running IIS 5.0, and have two DNS
domain names pointing to the same machine.

1. http://www.*-*-*.com/
2. http://www.*-*-*.com/

Now, I'd like to write a script to imbed in the default.asp file that's at
the wwwroot directory of this machine, that will listen to what the client
browser is asking for, and then redirect the incoming request to a
subdirectory on that machine. I.e. an incoming request for
http://www.*-*-*.com/ would be redirected to
http://www.*-*-*.com/
for http://www.*-*-*.com/ would be redirected to
http://www.*-*-*.com/

I don't care whether the script is VB or JS, just so long as it works. I've
lost nearly a day (read: ASP neophyte!) on this, with no success, and I know
that somebody can throw this together in three lines of code. Please!

Sorry if this is an FAQ.
--
_______________________________________

Mark Johnson
Marquette University (Theology)
http://www.*-*-*.com/
_______________________________________



Tue, 04 Feb 2003 03:00:00 GMT  
 Redirection help needed.

--index.html--
<html>
<head>
<script>
function go() {
if(location.href=='http://www.firstdept.university.edu')
location.href='http://www.firstdept.university.edu/firstdeptsubdir';
else
location.href='http://www.seconddept.university.edu/seconddeptsubdir'

Quote:
}

</script>
</head>
<body onload=go()>
</body>
</html>

--

Mark L. Ferguson    Reply Only in Newsgroup
marfer's notes for OE 5.0 > http://www.geocities.com/SiliconValley/Bay/6386/IE_ng_notes.htm

Quote:
> I need help with a redirection issue. I'm running IIS 5.0, and have two DNS
> domain names pointing to the same machine.

> 1. http://www.firstdept.university.edu
> 2. http://www.seconddept.university.edu

> Now, I'd like to write a script to imbed in the default.asp file that's at
> the wwwroot directory of this machine, that will listen to what the client
> browser is asking for, and then redirect the incoming request to a
> subdirectory on that machine. I.e. an incoming request for
> http://www.firstdept.university.edu would be redirected to
> http://www.firstdept.university.edu/firstdeptsubdir and an incoming request
> for http://www.seconddept.university.edu would be redirected to
> http://www.seconddept.university.edu/seconddeptsubdir.

> I don't care whether the script is VB or JS, just so long as it works. I've
> lost nearly a day (read: ASP neophyte!) on this, with no success, and I know
> that somebody can throw this together in three lines of code. Please!

> Sorry if this is an FAQ.
> --
> _______________________________________

> Mark Johnson
> Marquette University (Theology)
> http://www.theo.mu.edu/mjohnson
> _______________________________________



Tue, 04 Feb 2003 03:00:00 GMT  
 Redirection help needed.

You can also use the IIS Host Header function as well to do the same thing.

--

=====================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, Email Discussion List,
Newsletter, WebRing, MS KB Quick Links, etc.



Quote:
> I need help with a redirection issue. I'm running IIS 5.0, and have two
DNS
> domain names pointing to the same machine.

> 1. http://www.firstdept.university.edu
> 2. http://www.seconddept.university.edu

> Now, I'd like to write a script to imbed in the default.asp file that's at
> the wwwroot directory of this machine, that will listen to what the client
> browser is asking for, and then redirect the incoming request to a
> subdirectory on that machine. I.e. an incoming request for
> http://www.firstdept.university.edu would be redirected to
> http://www.firstdept.university.edu/firstdeptsubdir and an incoming
request
> for http://www.seconddept.university.edu would be redirected to
> http://www.seconddept.university.edu/seconddeptsubdir.

> I don't care whether the script is VB or JS, just so long as it works.
I've
> lost nearly a day (read: ASP neophyte!) on this, with no success, and I
know
> that somebody can throw this together in three lines of code. Please!

> Sorry if this is an FAQ.
> --
> _______________________________________

> Mark Johnson
> Marquette University (Theology)
> http://www.theo.mu.edu/mjohnson
> _______________________________________



Tue, 04 Feb 2003 03:00:00 GMT  
 Redirection help needed.
I've got an idea about how to do the flow-control, but what functions would
one use to get to the appropriate IIS host header function? I tried using
the server variables like URL and HTTP_REFERER, but came up empty.



Quote:
> You can also use the IIS Host Header function as well to do the same
thing.

> --

> =====================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, Email Discussion List,
> Newsletter, WebRing, MS KB Quick Links, etc.



> > I need help with a redirection issue. I'm running IIS 5.0, and have two
> DNS
> > domain names pointing to the same machine.

> > 1. http://www.firstdept.university.edu
> > 2. http://www.seconddept.university.edu

> > Now, I'd like to write a script to imbed in the default.asp file that's
at
> > the wwwroot directory of this machine, that will listen to what the
client
> > browser is asking for, and then redirect the incoming request to a
> > subdirectory on that machine. I.e. an incoming request for
> > http://www.firstdept.university.edu would be redirected to
> > http://www.firstdept.university.edu/firstdeptsubdir and an incoming
> request
> > for http://www.seconddept.university.edu would be redirected to
> > http://www.seconddept.university.edu/seconddeptsubdir.

> > I don't care whether the script is VB or JS, just so long as it works.
> I've
> > lost nearly a day (read: ASP neophyte!) on this, with no success, and I
> know
> > that somebody can throw this together in three lines of code. Please!

> > Sorry if this is an FAQ.
> > --
> > _______________________________________

> > Mark Johnson
> > Marquette University (Theology)
> > http://www.theo.mu.edu/mjohnson
> > _______________________________________



Tue, 04 Feb 2003 03:00:00 GMT  
 Redirection help needed.

You would assign the domain to the same IP address as the main web, then in
the Host Header function indicated the folder for the domain name to use.

--

=====================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, Email Discussion List,
Newsletter, WebRing, MS KB Quick Links, etc.



Quote:
> I've got an idea about how to do the flow-control, but what functions
would
> one use to get to the appropriate IIS host header function? I tried using
> the server variables like URL and HTTP_REFERER, but came up empty.



> > You can also use the IIS Host Header function as well to do the same
> thing.

> > --

> > =====================================
> > Thomas A. Rowe (Microsoft MVP - FrontPage)
> > WEBMASTER Resources(tm)
> > http://www.ycoln-resources.com
> > FrontPage Resources, Email Discussion List,
> > Newsletter, WebRing, MS KB Quick Links, etc.



> > > I need help with a redirection issue. I'm running IIS 5.0, and have
two
> > DNS
> > > domain names pointing to the same machine.

> > > 1. http://www.firstdept.university.edu
> > > 2. http://www.seconddept.university.edu

> > > Now, I'd like to write a script to imbed in the default.asp file
that's
> at
> > > the wwwroot directory of this machine, that will listen to what the
> client
> > > browser is asking for, and then redirect the incoming request to a
> > > subdirectory on that machine. I.e. an incoming request for
> > > http://www.firstdept.university.edu would be redirected to
> > > http://www.firstdept.university.edu/firstdeptsubdir and an incoming
> > request
> > > for http://www.seconddept.university.edu would be redirected to
> > > http://www.seconddept.university.edu/seconddeptsubdir.

> > > I don't care whether the script is VB or JS, just so long as it works.
> > I've
> > > lost nearly a day (read: ASP neophyte!) on this, with no success, and
I
> > know
> > > that somebody can throw this together in three lines of code. Please!

> > > Sorry if this is an FAQ.
> > > --
> > > _______________________________________

> > > Mark Johnson
> > > Marquette University (Theology)
> > > http://www.theo.mu.edu/mjohnson
> > > _______________________________________



Tue, 04 Feb 2003 03:00:00 GMT  
 Redirection help needed.
Stress! I'm not following because I'm new to this. Where are the Host Header
functions in IIS? In the Session object? Er? Sorry to be a doof here. I
don't mean for you to hand-hold me through this, but I'm missing something
that you're saying.



Quote:
> You would assign the domain to the same IP address as the main web, then
in
> the Host Header function indicated the folder for the domain name to use.

> --

> =====================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, Email Discussion List,
> Newsletter, WebRing, MS KB Quick Links, etc.



> > I've got an idea about how to do the flow-control, but what functions
> would
> > one use to get to the appropriate IIS host header function? I tried
using
> > the server variables like URL and HTTP_REFERER, but came up empty.



> > > You can also use the IIS Host Header function as well to do the same
> > thing.

> > > --

> > > =====================================
> > > Thomas A. Rowe (Microsoft MVP - FrontPage)
> > > WEBMASTER Resources(tm)
> > > http://www.ycoln-resources.com
> > > FrontPage Resources, Email Discussion List,
> > > Newsletter, WebRing, MS KB Quick Links, etc.



> > > > I need help with a redirection issue. I'm running IIS 5.0, and have
> two
> > > DNS
> > > > domain names pointing to the same machine.

> > > > 1. http://www.firstdept.university.edu
> > > > 2. http://www.seconddept.university.edu

> > > > Now, I'd like to write a script to imbed in the default.asp file
> that's
> > at
> > > > the wwwroot directory of this machine, that will listen to what the
> > client
> > > > browser is asking for, and then redirect the incoming request to a
> > > > subdirectory on that machine. I.e. an incoming request for
> > > > http://www.firstdept.university.edu would be redirected to
> > > > http://www.firstdept.university.edu/firstdeptsubdir and an incoming
> > > request
> > > > for http://www.seconddept.university.edu would be redirected to
> > > > http://www.seconddept.university.edu/seconddeptsubdir.

> > > > I don't care whether the script is VB or JS, just so long as it
works.
> > > I've
> > > > lost nearly a day (read: ASP neophyte!) on this, with no success,
and
> I
> > > know
> > > > that somebody can throw this together in three lines of code.
Please!

> > > > Sorry if this is an FAQ.
> > > > --
> > > > _______________________________________

> > > > Mark Johnson
> > > > Marquette University (Theology)
> > > > http://www.theo.mu.edu/mjohnson
> > > > _______________________________________



Tue, 04 Feb 2003 03:00:00 GMT  
 Redirection help needed.
See:
http://support.microsoft.com/support/kb/articles/Q190/0/08.ASP

--

=====================================
Thomas A. Rowe (Microsoft MVP - FrontPage)
WEBMASTER Resources(tm)
http://www.ycoln-resources.com
FrontPage Resources, Email Discussion List,
Newsletter, WebRing, MS KB Quick Links, etc.



Quote:
> Stress! I'm not following because I'm new to this. Where are the Host
Header
> functions in IIS? In the Session object? Er? Sorry to be a doof here. I
> don't mean for you to hand-hold me through this, but I'm missing something
> that you're saying.



> > You would assign the domain to the same IP address as the main web, then
> in
> > the Host Header function indicated the folder for the domain name to
use.

> > --

> > =====================================
> > Thomas A. Rowe (Microsoft MVP - FrontPage)
> > WEBMASTER Resources(tm)
> > http://www.ycoln-resources.com
> > FrontPage Resources, Email Discussion List,
> > Newsletter, WebRing, MS KB Quick Links, etc.



> > > I've got an idea about how to do the flow-control, but what functions
> > would
> > > one use to get to the appropriate IIS host header function? I tried
> using
> > > the server variables like URL and HTTP_REFERER, but came up empty.



> > > > You can also use the IIS Host Header function as well to do the same
> > > thing.

> > > > --

> > > > =====================================
> > > > Thomas A. Rowe (Microsoft MVP - FrontPage)
> > > > WEBMASTER Resources(tm)
> > > > http://www.ycoln-resources.com
> > > > FrontPage Resources, Email Discussion List,
> > > > Newsletter, WebRing, MS KB Quick Links, etc.


message

> > > > > I need help with a redirection issue. I'm running IIS 5.0, and
have
> > two
> > > > DNS
> > > > > domain names pointing to the same machine.

> > > > > 1. http://www.firstdept.university.edu
> > > > > 2. http://www.seconddept.university.edu

> > > > > Now, I'd like to write a script to imbed in the default.asp file
> > that's
> > > at
> > > > > the wwwroot directory of this machine, that will listen to what
the
> > > client
> > > > > browser is asking for, and then redirect the incoming request to a
> > > > > subdirectory on that machine. I.e. an incoming request for
> > > > > http://www.firstdept.university.edu would be redirected to
> > > > > http://www.firstdept.university.edu/firstdeptsubdir and an
incoming
> > > > request
> > > > > for http://www.seconddept.university.edu would be redirected to
> > > > > http://www.seconddept.university.edu/seconddeptsubdir.

> > > > > I don't care whether the script is VB or JS, just so long as it
> works.
> > > > I've
> > > > > lost nearly a day (read: ASP neophyte!) on this, with no success,
> and
> > I
> > > > know
> > > > > that somebody can throw this together in three lines of code.
> Please!

> > > > > Sorry if this is an FAQ.
> > > > > --
> > > > > _______________________________________

> > > > > Mark Johnson
> > > > > Marquette University (Theology)
> > > > > http://www.theo.mu.edu/mjohnson
> > > > > _______________________________________



Tue, 04 Feb 2003 03:00:00 GMT  
 Redirection help needed.
Thanks, Tom.

I now understand what you've been after. I'll check the docs and get right
to this.



Quote:
> See:
> http://support.microsoft.com/support/kb/articles/Q190/0/08.ASP

> --

> =====================================
> Thomas A. Rowe (Microsoft MVP - FrontPage)
> WEBMASTER Resources(tm)
> http://www.ycoln-resources.com
> FrontPage Resources, Email Discussion List,
> Newsletter, WebRing, MS KB Quick Links, etc.



> > Stress! I'm not following because I'm new to this. Where are the Host
> Header
> > functions in IIS? In the Session object? Er? Sorry to be a doof here. I
> > don't mean for you to hand-hold me through this, but I'm missing
something
> > that you're saying.



> > > You would assign the domain to the same IP address as the main web,
then
> > in
> > > the Host Header function indicated the folder for the domain name to
> use.

> > > --

> > > =====================================
> > > Thomas A. Rowe (Microsoft MVP - FrontPage)
> > > WEBMASTER Resources(tm)
> > > http://www.ycoln-resources.com
> > > FrontPage Resources, Email Discussion List,
> > > Newsletter, WebRing, MS KB Quick Links, etc.



> > > > I've got an idea about how to do the flow-control, but what
functions
> > > would
> > > > one use to get to the appropriate IIS host header function? I tried
> > using
> > > > the server variables like URL and HTTP_REFERER, but came up empty.



> > > > > You can also use the IIS Host Header function as well to do the
same
> > > > thing.

> > > > > --

> > > > > =====================================
> > > > > Thomas A. Rowe (Microsoft MVP - FrontPage)
> > > > > WEBMASTER Resources(tm)
> > > > > http://www.ycoln-resources.com
> > > > > FrontPage Resources, Email Discussion List,
> > > > > Newsletter, WebRing, MS KB Quick Links, etc.


> message

> > > > > > I need help with a redirection issue. I'm running IIS 5.0, and
> have
> > > two
> > > > > DNS
> > > > > > domain names pointing to the same machine.

> > > > > > 1. http://www.firstdept.university.edu
> > > > > > 2. http://www.seconddept.university.edu

> > > > > > Now, I'd like to write a script to imbed in the default.asp file
> > > that's
> > > > at
> > > > > > the wwwroot directory of this machine, that will listen to what
> the
> > > > client
> > > > > > browser is asking for, and then redirect the incoming request to
a
> > > > > > subdirectory on that machine. I.e. an incoming request for
> > > > > > http://www.firstdept.university.edu would be redirected to
> > > > > > http://www.firstdept.university.edu/firstdeptsubdir and an
> incoming
> > > > > request
> > > > > > for http://www.seconddept.university.edu would be redirected to
> > > > > > http://www.seconddept.university.edu/seconddeptsubdir.

> > > > > > I don't care whether the script is VB or JS, just so long as it
> > works.
> > > > > I've
> > > > > > lost nearly a day (read: ASP neophyte!) on this, with no
success,
> > and
> > > I
> > > > > know
> > > > > > that somebody can throw this together in three lines of code.
> > Please!

> > > > > > Sorry if this is an FAQ.
> > > > > > --
> > > > > > _______________________________________

> > > > > > Mark Johnson
> > > > > > Marquette University (Theology)
> > > > > > http://www.theo.mu.edu/mjohnson
> > > > > > _______________________________________



Wed, 05 Feb 2003 03:00:00 GMT  
 
 [ 8 post ] 

 Relevant Pages 

1. Redirection help needed.

2. DHTML Project needs redirection.

3. Redirection (HELP)

4. help with redirection to text file

5. Redirection in jscript HELP

6. Problems with a redirection...Plz help

7. help with redirection to text file

8. Help needed, urgent-- newbie need GS+GV for PC

9. ++Help Needed: we need a strong Postscript Viewer other than Ghostscript.++

10. {Need Help Big Project Need Help}

11. need need help help (911)!!!!!

12. I need help with a datediff problem ( a fairly new user who needs help)

 

 
Powered by phpBB® Forum Software