Bakkoda
05-11-2004, 09:26 PM
I'll try to explain this as best I can.
Well I am making a site for a group of friends and I want to make sure the user stays on the "beaten path". I have the index.cfm page which has the logo and is the main point of enrty for the site. Then default.cfm is the page which is the meat of the site. Its mostly a path handler, bringing all the content to one template. SO I have a bunch of external files tht are imported with <cfinclude> to the default.cfm so the user never leaves this page.
Well I am trying to set up a way to make sure a user doesnt go snooping and try to acces the external files (ie. news.cfm which is just a table with news entries) by having the Application.cfm check the CGI.SCRIPT_NAME variable. If it isnt "/default.cfm" or "/index.cfm" I want the page to stop loading. I have accomplished this (two different ways actually) and I still get the same problem. With <CFABORT> anywherwe in the code, even if the age is allowed, CSS is not applied to the page. <CFEXIT> does the same thing.
<cfif CGI.SCRIPT_NAME is "/default.cfm" or CGI.SCRIPT_NAME is "/index.cfm">
<cfelse>
Wrong page!!!
<cfabort>
</cfif>
I had this page first in the Application.cfm file and then made an external file (path_check.cfm) and included it into the Application.cfm both with the same results. Any help would be appreciated.
EDIT: Actually now that I look at it, even without the <CFABORT> tag the CSS does not work. Soon as I check to see the script name, CSS stops working.
Well I am making a site for a group of friends and I want to make sure the user stays on the "beaten path". I have the index.cfm page which has the logo and is the main point of enrty for the site. Then default.cfm is the page which is the meat of the site. Its mostly a path handler, bringing all the content to one template. SO I have a bunch of external files tht are imported with <cfinclude> to the default.cfm so the user never leaves this page.
Well I am trying to set up a way to make sure a user doesnt go snooping and try to acces the external files (ie. news.cfm which is just a table with news entries) by having the Application.cfm check the CGI.SCRIPT_NAME variable. If it isnt "/default.cfm" or "/index.cfm" I want the page to stop loading. I have accomplished this (two different ways actually) and I still get the same problem. With <CFABORT> anywherwe in the code, even if the age is allowed, CSS is not applied to the page. <CFEXIT> does the same thing.
<cfif CGI.SCRIPT_NAME is "/default.cfm" or CGI.SCRIPT_NAME is "/index.cfm">
<cfelse>
Wrong page!!!
<cfabort>
</cfif>
I had this page first in the Application.cfm file and then made an external file (path_check.cfm) and included it into the Application.cfm both with the same results. Any help would be appreciated.
EDIT: Actually now that I look at it, even without the <CFABORT> tag the CSS does not work. Soon as I check to see the script name, CSS stops working.