Hi,

ideally, I'd like cake to get a request only when the full path (minus
the path of the webroot) of the directory or file does not exist. As I
understand it in the situation now, the request doesn't get through as
soon as the first directory exists, but no further checks are being
done.

e.g.
I have a controller IntranetController which would be called as soon
as you request /intranet .
But I also have a directory /intranet/downloads , which should be
accessible without going through cake. It should not call the intranet
controller with the action downloads but serve the directory listing
of /intranet/downloads.

So, I have 2 questions:
1/ Is above situation possible only with apache and .htaccess files?
I've tried the following in the .htaccess file in the root of the cake
directory tree:
    <IfModule mod_rewrite.c>
       RewriteEngine on
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule    ^$ app/webroot/    [L]
       RewriteCond %{REQUEST_FILENAME} !-d
       RewriteCond %{REQUEST_FILENAME} !-f
       RewriteRule    (.*) app/webroot/$1 [L]
    </IfModule>
This doesn't work. As soon as /intranet is requested, I get the a 403
(which it should do when you would request it and no cake was
installed, as I don't allow a directroy listing) where I'd like to get
the page rendered by cake. As soon as I request /intranet/downloads, I
get a Missing action error. These are the opposite responses as I was
hoping for.

2/ If apache fails, the sollution would be that I should have a check
performed in cake to see if the requested address physically exists on
the server. And when it does, redirect the user. But I'd rather not.

Any ideas?
Kenny


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to