Here is a file that I use.
 
<CFELSEIF FindNoCase("firstdomain.com","#CGI.SERVER_NAME#")>
    <CFLOCATION URL="/firstfolder">
<CFELSEIF FindNoCase("seconddomain.com","#CGI.SERVER_NAME#")>
    <CFLOCATION URL="/secondfolder">
<CFELSEIF FindNoCase("thirddomain.com","#CGI.SERVER_NAME#")>
    <CFLOCATION URL="/thirdfolder">
<CFELSE>
    You came to unknown domain. Please choose one of the following:<br>
    <a href='http://www.firstdomain.com'>http://www.firstdomain.com</a><br>
    <a href='http://www.secondomain.com'>http://www.secondomain.com</a><br>
    <a href='http://www.thirddomain.com'>http://www.thirddomain.com</a><br>
</CFIF>
 
Mickael
----- Original Message -----
Sent: Tuesday, March 26, 2002 7:04 PM
Subject: [CFTALKTor] Sending to a different folder depending on the domain name

Hi
 
I have customers with many Domain names pointing to the same site. I am using an ASP script to direct users to a different folder for each domain name. I want to know if it is possible to do the same with Cold Fusion.
 
Here is the ASP script:
 
 <% 
 Response.buffer = true
 
 IF  Request.ServerVariables("SERVER_NAME") = "www.firstdomainname.com" then
 response.redirect "/firstfolder"
 ElseIF  Request.ServerVariables("SERVER_NAME") = "www.seconddomainname.com" then
 response.redirect "/secondfolder"
 ElseIF  Request.ServerVariables("SERVER_NAME") = "www.thirddomainname.com" then
 response.redirect "/thirdfolder"
 
End If
 %>
 
Thank you
 
Jean-Pierre Picard

Reply via email to