I am not sure why my code are not read when the user visit my page but if I refresh the page
I can see that it is going thru the code.
for example I said if the cookie exist then go to the home page. but for some reason it will only go to the home page if I refresh the page. the cookie is there so it should automatically go to the home page.
<CFIF #CGI.HTTP_X_Forwarded_For# EQ "">
<CFQUERY DATASOURCE="xxx" NAME="GetIPADD">
Select distinct IPAddress, ChurchID FROM xx where IPAddress = '#ipaddress#'
<cfif GetIPADD.RecordCount neq 0>
<cfcookie name="GetIPUser" value="#ipaddress#" expires="30">