Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /*
- * I run http://localhost/coldfusion/cfinclude/index.cfm
- * Everything works fine. I have "Hello World!" on my screen. BUT!
- * In my Apache error logs:
- * [...] client denied by server configuration: D:/Work/LAB/coldfusion/cfinclude/includes/include.cfm
- *
- * The include is working, but it generates an error in Apache.
- *
- * I want the .htaccess to block the direct call of http://localhost/coldfusion/cfinclude/includes/include.cfm
- */
- /* Project files
- D:\Work\Lab\coldfusion\cfinclude
- └ includes
- ├ .htaccess
- └ includes.cfm
- └ Application.cfc
- └ index.cfm
- */
- /*
- * includes/.htaccess
- */
- Require all denied
- /*
- * includes/includes.cfm
- */
- Hello World!
- /*
- * Application.cfc
- */
- component
- {
- this.mappings[ "/coldfusion" ] = "D:\Work\LAB\coldfusion";
- }
- /*
- * index.cfm
- */
- <cfinclude template="/coldfusion/cfinclude/includes/include.cfm">
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement