Password Protecting diectory causing redirect loop

kavos1332

Active Member
Dec 17, 2012
40
0
6
cPanel Access Level
Root Administrator
Hello cPanel Experts

I am server admin. There is a wordpress site which when password protect wp-admin/ on it, causes redirect loop. By default, wp-admin/ redirects user to wp-login.php, if not logged in, which is outside the wp-admin/ It seems password protection rule is somehow confilicting with rewrite rules There are some pages on the net regarding it but they dis not help

Please help ASAP
 

hgrg

Well-Known Member
Oct 4, 2010
90
0
56
cPanel Access Level
Root Administrator
maybe you should at least copy-paste the contents of the htaccess files.. you can expect ppl to solve your problem if you do not describe the problem in details..
 

kavos1332

Active Member
Dec 17, 2012
40
0
6
cPanel Access Level
Root Administrator
Oh sorry! you're right. The bellow is contents of global .htaccess within public_html:

Code:
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

# END WordPress
And bellow is contents of .htaccess within wp-admin/ directory:

Code:
AuthUserFile "/home/paraf/.htpasswds/public_html/wp-admin/passwd"
AuthName "wp-admin"

<Files admin-ajax.php>
    Order allow,deny
    Allow from all
    Satisfy any 
</Files>
AuthType Basic
require valid-user
 

kdean

Well-Known Member
Oct 19, 2012
386
69
78
Orlando, FL
cPanel Access Level
Root Administrator
Have to ask, why are you passwording the wp-admin folder when wordpress already has it's own password system. That's probably your main problem right there.
 

kavos1332

Active Member
Dec 17, 2012
40
0
6
cPanel Access Level
Root Administrator
Have to ask, why are you passwording the wp-admin folder when wordpress already has it's own password system. That's probably your main problem right there.
This is not my choise. This my client's decision and his ticket is open since Monday. There are a lot of people out there who want to have two login stages for extra security however it makes it mpre difficult for themselves to access. But we are not there to convince people what to do and not to do.