Adysone

Cfinclude ACF

Sep 20th, 2019
662
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * I run http://localhost/coldfusion/cfinclude/index.cfm
  3.  * Everything works fine. I have "Hello World!" on my screen. BUT!
  4.  * In my Apache error logs:
  5.  * [...] client denied by server configuration: D:/Work/LAB/coldfusion/cfinclude/includes/include.cfm
  6.  *
  7.  * The include is working, but it generates an error in Apache.
  8.  *
  9.  * I want the .htaccess to block the direct call of http://localhost/coldfusion/cfinclude/includes/include.cfm
  10.  */
  11.  
  12.  
  13. /* Project files
  14. D:\Work\Lab\coldfusion\cfinclude
  15.   └ includes
  16.     ├ .htaccess
  17.     └ includes.cfm
  18.   └ Application.cfc
  19.   └ index.cfm
  20. */
  21.  
  22. /*
  23.  * includes/.htaccess
  24.  */
  25. Require all denied
  26.  
  27. /*
  28.  * includes/includes.cfm
  29.  */
  30. Hello World!
  31.  
  32. /*
  33.  * Application.cfc
  34.  */
  35. component
  36. {
  37.     this.mappings[ "/coldfusion" ] = "D:\Work\LAB\coldfusion";
  38. }
  39.  
  40. /*
  41.  * index.cfm
  42.  */
  43. <cfinclude template="/coldfusion/cfinclude/includes/include.cfm">
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×