Ok, I did some reading and found a way to make the main
application.cfc file work with the application.cfc file in the sub
directory. I added a ProxyApplication.cfc with this code in it:
<cfcomponent extends="Application">
</cfcomponent>
and put this code in my application.cfc file in my sub
directory:
<cfcomponent output="false" extends="ProxyApplication">
<cffunction name="onRequestStart" returnType="void"
output="false">
</cffunction>
<cffunction name="onRequest" returntype="void">
<cfif NOT IsDefined("SESSION.user.firstname")>
<cflocation url="../sitemanager.cfm" addtoken="yes">
</cfif>
<cfif IsDefined("COOKIE.CFID") AND
IsDefined("COOKIE.CFTOKEN")>
<cfset cfid_local = COOKIE.CFID>
<cfset cftoken_local = COOKIE.CFTOKEN>
<cfcookie NAME="CFID" VALUE="#cfid_local#">
<cfcookie NAME="CFTOKEN" VALUE="#cftoken_local#">
</cfif>
</cffunction>
<cffunction name="onRequestEnd" returnType="void"
output="true">
</cffunction>
</cfcomponent>
Now it locks down my directory, BUT it still kicks me out
when I log in properly. WHY? I don't understand why it is not
reading this code properly. No errors, just won't let me log
in.