httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Mário Gamito" <gam...@gmail.com>
Subject [users@httpd] Rewrite rule preventing directory authentication
Date Wed, 22 Oct 2008 16:57:26 GMT
Hi,

I have this site that has in its root directory a .htaccess file with
the following rewritings:

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
SecFilterEngine off
</IfModule>

Now, I want to password protect a sudirectory /imgs/ with a .htaccess
and a .htpasswd files:


.htaccess:
AuthType Basic
AuthName imgs
AuthUserFile /home/absinto/public_html/imgs/.htpasswd
require valid-user

.htpasswd:
imgs:6TFsHlTQhms6Q

Login and password are both "imgs".

So far, so good, AFAIK.

Problem is that the first .htaccess clashes with the second, making
the protected directory give a 404:

If you care to visit:
http://www.absinto.org/imgs/firefox.png

you'll see what I mean.

How can I solve this puzzle ?

Any helkp would be appreciated.

Warm Regards,
Mário Gamito

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message