Advertisement
Adysone

Cfinclude ACF

Sep 20th, 2019
2,895
0
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">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement