On Apr 20, 9:19 am, "b logica" <[EMAIL PROTECTED]> wrote:
> On Sun, Apr 20, 2008 at 4:06 AM, Jon <[EMAIL PROTECTED]> wrote:
>
> >  I tried this...now I get a 404 error.  It was working with the two
> >  blocks.  Weird.
>
> Try RewriteRule ^/grades[.*]? - [L]

This causes neither /grades/ nor /grades/csv/ to work, whereas before
just /grades/ worked.

>
> >  When I remove the .htaccess file within /grades/csv/ it works.  The
> >  only problem is that we need that password protection...
>
> Are you confident the AuthUserFile path is correct and accessible by apache?
> Do you have anything under /grades/csv that has links to elsewhere?
> JS, or CSS, or the like?
I used my host's control panel (cPanel) to generate the .htaccess that
contains AuthUserFile.  It was working before moving CakePHP to the
server.  Just to be sure, I deleted it and recreated it using cPanel
and still no luck.  My guess is that somehow it's not being able to do
that auth, but I'm not sure how.  Within /grades/csv is just a plain
php file that references a database.  No references to JS or CSS--I
even tried using an empty PHP index page, but it still doesn't work.

>
> >  On Apr 18, 8:16 pm, "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 
"CakePHP" 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