Hello,
Thanks in advance.
In my top level html dir, I use the htaccess file to push everything that is not a file or a dir through the index where I parse the URL and load the correct content.
Code:
AddType application/x-httpd-php .htm .html .rss
#
RewriteEngine On
Options +FollowSymlinks -MultiViews
#
RewriteBase /
#
DirectoryIndex index.php
#
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !^(.*)(.pdf)$
RewriteRule . /index.php [L]
In a subdirectory, I want to do the same thing, except I want to PW protect this dir. Index.html in the subdirectory just lists the files in the dir with some instructions
Code:
AddType application/x-httpd-php .htm .html
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/########/inc/.htpasswd
require user ########
DirectoryIndex index.html
HERE IS THE PROBLEM.
If I browse to the subdirectory, I am presented with the custom 404 message used in the main directory for unresolved URLs, as if the request was being processed through the top level php content presentation system.
If I delete the htaccess in the in the top level, the subdirectory works as expected (but obviously, the main level content does not) OR, if I delete the htaccess file in the subdirectory instead, I get a regular apache directory listing of the subdir as expected.
It seems the 2 htaccess files are not working with each other some how.
Does anyone recognize this behavior?
Thanks again.
Phlebb