I'm using Simple Mailing List (http://www.notonebit.com/projects/mailing-list). It's good mailing list, but no admin area. So you have to use .htaccess/.htpasswd to protect the /mail/admin folder.
However, my site has WordPress installed in the website's root folder. WordPress creates .htaccess for custom permalinks. And for some reason, this interferes with the .htaccess of my /mail/admin/.
When I delete the WordPress .htaccess file, my password protection works properly on /mail/admin. However, when the WordPress .htaccess is present and I load /mail/admin in browser, I'm never asked for a password and I see a WordPress 404 page that says "page not found..."
Here are my files... WordPress .htaccess (located in root folder):
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
Mailing List .htaccess (located in /mail/admin):
AuthName "Restricted Area"
AuthType Basic
AuthUserFile /home/myUsername/public_html/mySndSite/mail/admin/.htpasswd
require valid-user
Any idea as to what is causing the conflict, and how I can resolve it? Been working at it for hours. Your help is much appreciated.
Thank You
EDIT: found a solution!
Found a solution on a Joomla blog. I don't know how, but this works... LOL :)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} (/|\.htm|\.php|\.html|#.*|\?.*|/[^.]*)$ [NC]
RewriteRule ^(.*) /index.php [L]
</IfModule>