Author |
Message |
31794 #1 / 8
|
 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 |
|
 |
Mark L. Ferguso #2 / 8
|
 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 |
|
 |
Thomas A. Row #3 / 8
|
 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 |
|
 |
31794 #4 / 8
|
 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 |
|
 |
Thomas A. Row #5 / 8
|
 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 |
|
 |
31794 #6 / 8
|
 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 |
|
 |
Thomas A. Row #7 / 8
|
 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 |
|
 |
31794 #8 / 8
|
 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 |
|
|
|