grep
grep

Reputation: 4016

URL rewrite and htauth confliction with .htaccess

I have an htaccess file as follows:

<IfModule mod_rewrite.c>    
    RewriteEngine On

    RewriteCond %{REQUEST_FILENAME} -f
    RewriteRule . - [L]

    RewriteRule ^$ app/ [L]
    RewriteRule (.+) app/$1 [L]
</IfModule>

Now, this is located in my web root, and I wanted to also password protect this and all sub-directories, so I added the following lines:

AuthName "phpMyAdmin Restricted Area."
AuthType Basic
AuthUserFile /usr/local/apache/.htpasswd
Require valid-user

This promted me and I was able to 'log in'. However, now my server is 500'ing on me, and I am not sure why. I can remove the auth lines, and this fixes the problem. Why is this happening, and what can I do?

Upvotes: 0

Views: 402

Answers (1)

grep
grep

Reputation: 4016

conflictions with another .htaccess file in the root dir.

Upvotes: 1

Related Questions