CF redirect
Hello,
my webserver data are as follows:
ColdFusion 5 (is there a particular hotfix you are looking for)?
Windows Server 2003
IIS 6.1.
I would like to do a redirect.
Specification:
For the URL field:
1. If a user enters XXXX.com the user will be pointed to:
http://XXXX.com/MainPath/Main.html
2. If a user enters www.XXXX.com the user will be pointed to:
http://www.XXXX.com/MainPath/Main.html
3. If a user enters XXXX.com/name1 the user will be pointed to http://XXXX.com/Path1
4. If a user enters XXX.com/name2 the user will be pointed to http://XXXX.com/Path2
5. If a user enters XXX.com/name3 the user will be pointed to http://XXXX.com/Path3
I am using this code:
<!--- Default locations --->
<CFIF server_name IS "www.XXXX.com" OR server_name IS "XXXX.com">
<CFLOCATION url="MainPath/Main.html">
<!--- For XXXX.com/name1 --->
<CFELSEIF CompareNoCase(cgi.server_name, "XXXX.com") EQ 0 AND CompareNoCase(ListGetAt(cgi.path_info, 1, "/"),"name1") EQ 0>
<CFLOCATION url=" http://XXXX.com/Path1">
<!--- For XXXX.com/korrosion point to Io00Korro01.cfm --->
<CFELSEIF CompareNoCase(cgi.server_name, "XXXX.com") EQ 0 AND CompareNoCase(ListGetAt(cgi.path_info, 1, "/")," name2") EQ 0>
<CFLOCATION url=" http://XXXX.com/Path2">
<!--- For XXXX.com/cell point to CellCycle01.cfm --->
<CFELSEIF CompareNoCase(cgi.server_name, "XXXX.com") EQ 0 AND CompareNoCase(ListGetAt(cgi.path_info, 1, "/")," name3") EQ 0>
<CFLOCATION url=" http://XXXX.com/Path3">
</CFIF>
Specification 1 and 2 above work well with <!--- Default locations --->
<CFIF server_name IS "www.XXXX.com" OR server_name IS "XXXX.com">
<CFLOCATION url="MainPath/Main.html">
But the rest of the code won't do the desired redirects of specification 3 to 5.
Help would be appreciated.
Phnoefniex
