Assuming the grades directory is outside the app directory then it
should suffice to change just the one .htaccess file as the others
won't be seen if a request for /grades arrives (it won't be redirected
into /app).
On Fri, Apr 18, 2008 at 10:59 PM, Sourabh Sharma
<[EMAIL PROTECTED]> wrote:
>
> In app folder of cake PHp we have 3 .htaccess files one is in root,
> second is in app folder and third is in webroot folder. if you are
> changing one .htaccess file then you have to change other also
> accordingly i think so .
>
> Thanks & Regards
> Sourabh sharma
>
>
> On Apr 19, 7:16 am, "b logica" <[EMAIL PROTECTED]> wrote:
> > You shouldn't use 2 blocks like that. Try this:
> >
> > <IfModule mod_rewrite.c>
> > RewriteEngine On
> > RewriteBase /
> > RewriteRule ^/grades - [L]
> > RewriteRule ^$ app/webroot/ [L]
> > RewriteRule (.*) app/webroot/$1 [L]
> > </IfModule>
> >
>
>
> > On Fri, Apr 18, 2008 at 4:15 PM, Jon <[EMAIL PROTECTED]> wrote:
> >
> > > I have CakePHP installed, and naturally it uses mod_rewrite to make
> > > the URLs clean. I made a modification to the htaccess file to allow
> > > me to ignore it for a certain directory. But then within that
> > > directory, I have an htaccess that defines password protection of that
> > > directory. Now I get a 404 error. How can I keep password
> > > protection, but allow it to function as normal? Here are my files:
> >
> > > .htaccess in document root:
> > > <IfModule mod_rewrite.c>
> > > RewriteEngine On
> > > RewriteBase /
> > > RewriteCond %{REQUEST_URI} grades
> > > RewriteRule ^.*$ - [L]
> >
> > > </IfModule>
> >
> > > <IfModule mod_rewrite.c>
> > > RewriteEngine on
> > > RewriteRule ^$ app/webroot/ [L]
> > > RewriteRule (.*) app/webroot/$1 [L]
> > > </IfModule>
> >
> > > .htaccess in the directory I want to protect:
> > > AuthType Basic
> > > AuthName "Restricted Area"
> > > AuthUserFile "/home/username/.htpasswds/public_html/grades/csv/passwd"
> > > require valid-user
>
> >
>
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---