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.

How do I disable htaccess for a specific domain in cpanel?

Discussion in 'Workarounds and Optimization' started by ish1301, Nov 28, 2011.

  1. ish1301

    ish1301 Registered

    Joined:
    Nov 28, 2011
    Messages:
    1
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Richmond Hill, Ontario, Canada
    cPanel Access Level:
    Website Owner
    I am looking for a way to add "AllowOverride None" only for a specific domain. I don't want to modify `/etc/httpd/conf/httpd.conf` for obvious reasons, as some domains need htaccess and some doesn't.

    Is there a way to achieve this, without loosing configurations on every rebuild.
     
    #1 ish1301, Nov 28, 2011
    Last edited: Nov 28, 2011
  2. cPanelTristan

    cPanelTristan Quality Assurance Analyst
    Staff Member

    Joined:
    Oct 2, 2010
    Messages:
    7,623
    Likes Received:
    21
    Trophy Points:
    38
    Location:
    somewhere over the rainbow
    cPanel Access Level:
    Root Administrator
    You could use /usr/local/apache/conf/includes/pre_main_global.conf and put the path to the user's home directory in it:

    Code:
    <Directory "/home/username">
        Options All
        AllowOverride None
    </Directory>
    Here I have Options All listed, but you would list whatever options you wanted for that specific user. Please replace username with the cPanel username for that account.

    After adding this include, you would need to restart Apache.
     
Loading...

Share This Page