How to Redirect Traffic to a Sub-Web?

  • Thread starter Thread starter Colin M. McGroarty
  • Start date Start date
C

Colin M. McGroarty

My current hosting provider can only use domain aliasing at the root level.
In my case, I have a domain called Sample.org. I also have a domain called
Construction.com. Web traffic for www.Construction.com is redirected to
www.Sample.org.



Using FrontPage 2002 is it possible to set up domain aliasing or redirection
so that a domain points to a sub-web? If so, how can it be done? For
Example, I have the domain Sample.org and have created the sub-web
www.Sample.org/Construction. I have a domain called Construction.com and
would like to have it point to the sub-web rather than the root web. In
other words, www.Construction.com should redirect web traffic to
www.Sample.org/Construction rather than to the root web of www.Sample.org.



Thanks in advance,


--
Colin M. McGroarty
MCP+I, MCSE, NT-CIP


(e-mail address removed)
www.McGroarty.org
 
-----Original Message-----
My current hosting provider can only use domain aliasing
at the root level. In my case, I have a domain called
Sample.org. I also have a domain called
Construction.com. Web traffic for www.Construction.com
is redirected to www.Sample.org.


Using FrontPage 2002 is it possible to set up domain
aliasing or redirection so that a domain points to a
sub-web? If so, how can it be done? For Example, I have
the domain Sample.org and have created the sub-web
www.Sample.org/Construction. I have a domain called
Construction.com and would like to have it point to the
sub-web rather than the root web. In other words,
www.Construction.com should redirect web traffic to
www.Sample.org/Construction rather than to the root web
of www.Sample.org.

Thanks in advance,

Colin M. McGroarty
MCP+I, MCSE, NT-CIP

(e-mail address removed)
www.McGroarty.org

If your Web server is IIS, rename the home page in the
server's root so it has an .asp filename extension and
then add this code (typically before the <head> tag):

If LCase(Request.ServerVariables("HTTP_HOST")) = _
"www.construction.com" Then
Response.Redirect( _
"http://www.construction.com/construction")
Response.End
End If

This is dependent on the visitor's browser sending the
request host name in the HTTP request headers, but all
modern browsers do this.

If your Web server isn't IIS, then you'd have to do
something similar in PHP or whatever the Web server
supports.

Alternatively, most hosting providers can configure the
Web server to perform the redirection automatically for
you.

Jim Buyens
Microsoft FrontPage MVP
(e-mail address removed)
http://www.interlacken.com
Author of:
*------------------------------------------------------*
|\----------------------------------------------------/|
|| Microsoft Office FrontPage 2003 Inside Out ||
|| Microsoft FrontPage Version 2002 Inside Out ||
|| Web Database Development Step by Step .NET Edition ||
|| Troubleshooting Microsoft FrontPage 2002 ||
|| Faster Smarter Beginning Programming ||
|| (All from Microsoft Press) ||
|/----------------------------------------------------\|
*------------------------------------------------------*
 
Back
Top