开发者

URL rewrite and htauth confliction with .htaccess

开发者 https://www.devze.com 2023-03-31 15:10 出处:网络
I have an htaccess file as follows: <IfModule mod_rewrite.c> RewriteEngine On RewriteCond %{REQUEST_FILENAME} -f

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 开发者_JS百科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?


conflictions with another .htaccess file in the root dir.

0

精彩评论

暂无评论...
验证码 换一张
取 消