htaccess & Apache Auth
-
Hi,
I’m trying to secure my wordpress installation using an .htaccess file. However, I have custom permalink settings, which adds this to my root .htaccess file:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
As soon as I add anything surrounding the wp-login.php file:
<Files wp-login.php>
AuthType Digest
AuthName “blah”
AuthUserFile /home/blah/.htpasswd
Require valid-user
</Files>I get 404 errors. If I remove the first section, the password protection works, but none of my permalinks work. If I remove the second section, permalinks work, but not security.
I can’t really see what I’m doing wrong here. Anyone have any idea?
Thanks
- The topic ‘htaccess & Apache Auth’ is closed to new replies.