Community Forums
Connect with us on LinkedIn
+ Reply to Thread
Results 1 to 3 of 3
  1. #1
    Member
    Join Date
    Feb 2005
    Posts
    223

    Default .htaccess propagates to add-on domains

    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. #2
    Super Moderator This forum account has been confirmed by cPanel staff to represent a vendor. chirpy's Avatar
    Join Date
    Jun 2002
    Location
    Go on, have a guess
    Posts
    13,495

    Default

    AFAIK, that's going to be the only option - moving the DocumentRoot in httpd.conf for the addon domain to a higher level.
    Jonathan Michaelson

    Need your cPanel servers secured and tuned?
    cPanel Server Configuration, Security, Recovery and Antivirus/AntiSpam Services
    Developers of the most effective (and free) Firewall & Security Solution for cPanel Servers - csf
    http://www.configserver.com

  3. #3
    BANNED
    Join Date
    Jun 2005
    Location
    Wild Wild West
    Posts
    2,025

    Default

    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.
    Last edited by Spiral; 04-09-2006 at 07:08 PM.

Similar Threads & Tags
Similar threads

  1. Listing Add-on domains only. Not add-on + sub domains
    By colinireland in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-13-2011, 03:33 PM
  2. Replies: 0
    Last Post: 11-10-2010, 07:13 PM
  3. htaccess block domains not working
    By Zion Ahead in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 04-01-2007, 07:58 PM
  4. Replies: 2
    Last Post: 02-11-2007, 02:29 AM
  5. transparent redirection of new domains, without .htaccess?
    By SoftDux in forum cPanel and WHM Discussions
    Replies: 0
    Last Post: 12-05-2006, 01:21 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube