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.

.htaccess Problems

Discussion in 'General Discussion' started by wilburburns, Dec 1, 2004.

  1. wilburburns

    wilburburns Member

    Joined:
    Nov 3, 2003
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Web Protect not working (.htaccess Problems)

    OK, I have 1 Client on my server who is having problems with .htaccess permissions.

    Mozilla gives the following error message...
    Code:
    Redirection limit for this URL exceeded.  Unable to load requested page.  This may be caused by cookies that are blocked.
    
    I have verified this problem on only this 1 account. I have tried to create the .htaccess file manually and via Cpanel. Both have the same problems with the same error.

    Below is the simple .htaccess file which does not work...
    Code:
    Authtype Basic
    AuthName "Testing"
    AuthUserFile "blah/blah/blah/"
    require valid-user
    
    Can anyone give me some ideas as to what is going on here?

    Thanks,
    Cliff Planck
     
    #1 wilburburns, Dec 1, 2004
    Last edited: Dec 1, 2004
  2. AndyReed

    AndyReed Well-Known Member
    PartnerNOC

    Joined:
    May 29, 2004
    Messages:
    2,222
    Likes Received:
    3
    Trophy Points:
    38
    Location:
    Minneapolis, MN
    Restricted Access

    The following line is a catch-all. If the domain was not one of the above on the valid list then this statement will be executed. It assumes you have created an error document in the primary domain (domain1) root called deny.html Change .com to .net as required.

    The second statement is used if you decided not to allow access by IP address, which means you deleted the condition for IP in the Host names section above. It also allows for a different message for the deny by IP. It could have been an "or" condition with the invalid subdomain if a standard deny message is used. Change .com to .net as required.

    Invalid domain or Subdomain
    RewriteCond %{HTTP_HOST} ^(.+).domain1.com$ [NC]
    RewriteRule ^(.+) http://domain1.com/deny.html [R,L]
    Generate error on access by IP (replace with your IP)
    RwriteCond %{HTTP_HOST} ^xxx.xxx.xxx.xxx$
    RwriteRule ^(.+) http://domain1.com/deny_ip.html [R,L]

    Hope this help!
     
  3. hostultra

    hostultra Well-Known Member

    Joined:
    Aug 21, 2002
    Messages:
    167
    Likes Received:
    0
    Trophy Points:
    16
    This sounds like an infinate loop problem.

    The .htaccess in your sample would not cause that.
    Most likely this user has another .htaccess in a subdirectory of the one in your sample which is causing the problem.

    Or else something to do with his error 401 page.
     
  4. wilburburns

    wilburburns Member

    Joined:
    Nov 3, 2003
    Messages:
    22
    Likes Received:
    0
    Trophy Points:
    1
    Thanks for the help... You pointed me in the right direction for the problem...

    The problem arose from a different .htaccess in the parent directory. It had 401 page handler which was not possible in this directory.

    Anyway, problem solved and Thanks..
    Cliff Planck
     
Loading...

Share This Page