Redd,

Your code works for me as-is.  The only thing I changed was setting
LoginFile to the same path as my test file (obviously).  I know you said you
are 100% sure the loginfile path is correct... but that's the only thing I
can see that could be wrong.

Instead of redirecting, try outputting the values of both for testing;

<cfif NOT #GetTemplatePath()# IS "#LoginFile#">
        <h2>No match.</h2>
        <cfoutput>
        LoginFile = #LoginFile#<br>
        GetTemplatePath = #GetTemplatePath()#<br>
        </cfoutput>
<cfelse>
        <h2>No problem here.</h2>
</cfif>

Good luck!

Douglas Malcolm



-----Original Message-----
From: Redd Liao [mailto:[EMAIL PROTECTED]]
Sent: Thursday, March 22, 2001 3:34 PM
To: CF-Server
Subject: GetTemplatePath()


hi,

I use IIS on Win 2000.
In my cfm file:
I set LoginFile = "C:\Inetpub\wwwroot\cyvdb\index.cfm"
then I use "IF" :
<cfif NOT #GetTemplatePath()# IS "#LoginFile#">
.........
    <cflocation url="index.cfm" addtoken="no">
.........
</cfif>

Question:
I am 100% sure that #GetTemplatePath()# = #LoginFile#,
but it always re-director the page to index.cfm
that means that #GetTemplatePath()# is not #LoginFile#,
but I am 100% sure that #GetTemplatePath()# = #LoginFile#,
I use UCase(), Lcase(), LTrim() and RTrim(). It still doesn't work.
What should I do? Thanks in advance.


Redd
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
------------------------------------------------------------------------------
To unsubscribe, send a message to [EMAIL PROTECTED] with 
'unsubscribe' in the body or visit the list page at www.houseoffusion.com

Reply via email to