Thanks buddy. Thats exactly what I was looking for. Its just to create the error page and you are done.
Thumbs up On Tuesday, April 22, 2008 8:47:13 AM UTC+5, Jon wrote: > > Whoa! I fixed it. If anybody runs into this same error, here's the > page that I learned about what to do: > http://textpattern.com/faq/173/password-protected-directories-with-htaccess > Apparently when you have authentication, it needs to have a 401 page, > which isn't accessible since the htaccess file disables it. > > On Apr 21, 12:41 am, Jon <[email protected]> wrote: > > 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 > -- Like Us on FaceBook https://www.facebook.com/CakePHP Find us on Twitter http://twitter.com/CakePHP --- You received this message because you are subscribed to the Google Groups "CakePHP" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/cake-php. For more options, visit https://groups.google.com/groups/opt_out.
