.htaccess and PW protected directory
-
I have some issues with WordPress .htaccess and password protected directories.
First of all:
The .htaccess from public_html:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
The .htaccess from commdemo (the directory that is pw protected):
AuthType Basic
AuthName “Restricted area”
AuthUserFile “/home/web2i0/.htpasswds/public_html/commdemo/passwd”
require valid-user# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule># END WordPress
I have wordpress installed on public_html and on the pw protected directory: commdemo. The problems is that the .htaccess from public_html is stoping the pw protected directory commdemo as is should.
Do you have any solutions for me? If I remove the content from .htaccess (public_html) commdemo is working as it should, but when I click on a link to a page it bombs with a 404 error.
https://www.web2insight.com/commdemo
https://www.web2insight.com/Please advice!
- The topic ‘.htaccess and PW protected directory’ is closed to new replies.