Right. That is not what I would call a proper setup. A proper setup would have 
DocumentRoot set to /path/to/app/webroot. And your flash directory (and 
robots.txt and favicon.ico and anything else the web server is supposed to 
serve directly, without interference by CakePHP) would go inside the webroot 
directory. That is the purpose of the webroot directory. Pointing the 
DocumentRoot to the webroot directory ensures visitors cannot receive files 
outside of the webroot directory which they're not supposed to see. (Normally 
your config files or other PHP source files would not do anything when called 
from a web browser directly, but they might produce error messages that would 
reveal information about your server, and if PHP somehow becomes disabled on 
your server due to a bad upgrade, you don't want visitors to be able to read 
your PHP sources.)


On May 20, 2011, at 19:44, David Kullmann wrote:

> I believe it depends on your .htaccess file as well.
> 
> I have this:
> 
>   RewriteCond %{REQUEST_FILENAME} !-d
>   RewriteCond %{REQUEST_FILENAME} !-f
>   RewriteRule    (.*) app/webroot/$1 [L]
> 
> To check for a file or directory.
> 
> My DocumentRoot is the directory which contains APP:
> 
> ls -1d app/ flash/
> app/
> flash/
> 
> I have documents in the flash directory that are served if you visit
> domain.com/flash/filename.swf




-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
[email protected] For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to