The Community Forums

Interact with an entire community of cPanel & WHM users!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Password Protecting diectory causing redirect loop

Discussion in 'Security' started by kavos1332, Dec 17, 2012.

  1. kavos1332

    kavos1332 Active Member

    Joined:
    Dec 17, 2012
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    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
     
  2. kavos1332

    kavos1332 Active Member

    Joined:
    Dec 17, 2012
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    Nobody ere can help? Did you posted it at wrong place?
     
  3. hgrg

    hgrg Well-Known Member

    Joined:
    Oct 4, 2010
    Messages:
    90
    Likes Received:
    0
    Trophy Points:
    6
    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..
     
  4. kavos1332

    kavos1332 Active Member

    Joined:
    Dec 17, 2012
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    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
    
     
  5. kdean

    kdean Well-Known Member

    Joined:
    Oct 19, 2012
    Messages:
    262
    Likes Received:
    12
    Trophy Points:
    18
    Location:
    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.
     
  6. kavos1332

    kavos1332 Active Member

    Joined:
    Dec 17, 2012
    Messages:
    40
    Likes Received:
    0
    Trophy Points:
    6
    cPanel Access Level:
    Root Administrator
    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.
     
  7. LDHosting

    LDHosting Well-Known Member

    Joined:
    Jan 19, 2008
    Messages:
    93
    Likes Received:
    2
    Trophy Points:
    8
    cPanel Access Level:
    Root Administrator
    Try adding the following line to the top of .htaccess

    ErrorDocument 401 default
     
    Jcats likes this.
Loading...

Share This Page