You are here: Home > FAQs

arrowHome
arrowAbout Edge Web
arrowServices
    arrowManaged Servers
    arrowColocation
    arrowClusters
    arrowAnti-Spam
    arrowShared Hosting
    arrowDevelopment
arrowResellers
arrowSupport
    arrowFAQs

Frequently Asked QuestionsFrequently Asked Questions

Search for:
View: FAQ Home

How can I direct a domain name to a particular directory on my site?

There are a couple of ways to achieve this. Most of our customers opt to use a code snippet on their home pages to redirect the request. Here is a Cold Fusion example:
<CFIF CGI.SERVER_NAME eq "my2nddomain.com"
OR CGI.SERVER_NAME eq "www.my2nddomain.com">
<CFLOCATION URL="http://www.mydomain.com/2ndpage.htm">
</CFIF>
However, search engines may have trouble following this (CFLOCATION uses the "302" redirect, or temporary redirect). To use a permanent redirect, Macromedia suggests the following:
<CFIF CGI.SERVER_NAME eq "my2nddomain.com"
OR CGI.SERVER_NAME eq "www.my2nddomain.com">
<CFHEADER statuscode="301" statustext="Moved permanently">
<CFHEADER name="Location" value=" http://www.mydomain.com/2ndpage.htm">
</CFIF>
Through testing we have determined that this does not work, and will in fact use a 302 redirect. The work-around is:
<CFIF CGI.SERVER_NAME eq "my2nddomain.com"
OR CGI.SERVER_NAME eq "www.my2nddomain.com">
<cfheader statuscode="301"
statustext="Moved Permanently#Chr(13)##Chr(10)#Location:http://www.mydomain.com/2ndpage.htm">
</CFIF>
We also have a redirection service available, however it is not as customizable as the code above.
Another way to do this is by setting up a host-header site.

This question is also found in:

© 2009 All information copyright Edgewebhosting, Incorporated. All rights reserved. All content is protected by Title 17, U.S.C.S. and the Copyright Act of 1975. Any unauthorized use or duplication of the information or content on this site is strictly prohibited without expressed written consent of the copyright owners. All trademarks are property of their respective owners.
SecurityMetrics PCI Certified