Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

.htaccess propagates to add-on domains

Discussion in 'General Discussion' started by shacker23, Apr 6, 2006.

  1. shacker23

    shacker23 Well-Known Member

    Joined:
    Feb 20, 2005
    Messages:
    263
    Likes Received:
    1
    Trophy Points:
    168
    Hmmm... a user has a main domain protected with .htaccess -- working fine.

    Then they add an add-on domain, which of course is installed under public_html. The password protection propagates to the add-on domain, which they don't want password protected.

    Apache is working properly - .htaccess is working as it should, as far as apache is concerned. IMO, this is a problem with the way cPanel sets up add-on domains (Plesk handles this better - add-on domains go into their document root rather than sharing one with the main domain).

    Meanwhile, is there a way to turn off password protection for the add-on domain?

    I asked a similar question regarding mod_rewrite a while ago for another client:
    http://forums.cpanel.net/showthread.php?t=47574

    The answer there was to turn off mod_rewrite for that subdir. But I can't figure out how to turn off password protection for subdirs. Ideas? The only other alternative I can think of would be to move the main domain to public_html/maindomain and the add-on to public_html/addondomain. This would require editing httpd.conf and reconfiguring their MovableType installation. Doable, but would prefer to avoid if possible.

    Thanks,
    Scot
     
  2. chirpy

    chirpy Well-Known Member

    Joined:
    Jun 15, 2002
    Messages:
    13,460
    Likes Received:
    21
    Trophy Points:
    463
    Location:
    Go on, have a guess
    AFAIK, that's going to be the only option - moving the DocumentRoot in httpd.conf for the addon domain to a higher level.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  3. Spiral

    Spiral BANNED

    Joined:
    Jun 24, 2005
    Messages:
    2,023
    Likes Received:
    8
    Trophy Points:
    193
    There is an easier way ....

    Create a .htaccess file in the add-on domain folder

    (If it has it's own .htaccess, it will superceed the main site .htaccess)

    Another cleaner but somewhat more complicated solution would be
    to move the add-on folder to the main root folder of the account
    on the same tier as public_html and then update the httpd.conf
    to point the add-on domain to that location.

    Doing it this way, the add-on domain functions totally separate and
    is no longer effected by any settings of the main domain.

    If you use this option, don't forget to restart Apache after updating
    the /etc/httpd/conf/httpd.conf file.
     
    #3 Spiral, Apr 9, 2006
    Last edited: Apr 9, 2006
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice