Community Forums
Connect with us on LinkedIn
  
+ Reply to Thread
Results 1 to 10 of 10
  1. #1
    Member
    Join Date
    Jul 2008
    Posts
    254

    Smile .htaccess

    Hello

    How can i enable/disable this option for user accounts?


    Thanks

  2. #2
    Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel/Enkompass Access Level

    DataCenter Provider

    Smile

    Quote Originally Posted by ASTRAPI View Post
    Hello

    How can i enable/disable this option for user accounts?


    Thanks
    You can disable .htaccess for a particular domain by editing the /etc/httpd/conf/httpd.conf file & following the below mentioned steps:

    Open the /etc/httpd/conf/httpd.conf file.
    Search for the "AllowOverride None" string.

    it'd look like :
    <Directory "/">
    AllowOverride None
    </Directory>
    Append it by:
    <Directory "/home/username/public_html">
    AllowOverride None
    </Directory>
    Such that it looks like:
    <Directory "/">
    AllowOverride None
    </Directory>

    <Directory "/home/username/public_html">
    AllowOverride None
    </Directory>
    Doing so would disable the .httaccess for that particular username/domain.

  3. #3
    Member
    Join Date
    Jul 2008
    Posts
    254

    Default

    And to enable it?

  4. #4
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by ASTRAPI View Post
    And to enable it?
    .htaccess is enabled by default.

    Remember, do not modify httpd.conf directly. Use the include files instead as mentioned in the EasyApache documentation: cPanel - The Easy Apache Configuration System - Adding Custom Directives to httpd.conf

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

    Default

    Actually viraj made a typographical error just as a matter
    of technical correction. The root directory location
    section ("/") of your httpd.conf file has a default setting
    of "AllowOverride All" which means to allow
    .HTACCESS files instead of "AllowOverride None".

    (If you search for "AllowOverride None" in that section
    then you probably wouldn't find anything unless your
    httpd.conf file has already been misconfigured)

    After that, you should indeed put "AllowOverride None"
    in a separate location as viraj told you and that part
    of what they told you is correct. Although a better
    way to do that might be to do it as a vhost include
    file just so you don't have to constantly re-edit your
    main httpd.conf file or have to remember to keep
    it matched up to your actual active accounts.

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

    Default

    It apparently gets better and better (yes that was sarcasm) ...

    Last night I took apart a server and went over all the configuration
    lines in httpd.conf and the other files loaded and found that the
    configuration for .HTACCESS was indeed accurate in the main
    files but not listed for the virtualhost.

    Thinking the directives might actually need to be in the virtualhost
    sections as well, I ran a few more test with those added and the
    Apache server restarted but no such luck there either but then
    I ran tests with Auth (Deny From / Allow From) directives added
    directly to the httpd.conf file and found those don't work either!

    So in a nutshell, the servers are not only not reading the .HTACCESS
    commands but they apparently are ignoring all authentication commands
    entirely which is now making me wonder if MOD_AUTH was forgotten
    in the Apache Build. If you go into Easy_Apache, it's not listed as a
    build option but you would think Cpanel would know to add that one
    by default into the build.

    Anyway, bottom line is the servers aren't processing any authentication
    commands whatsoever irregardless of .HTACCESS or HTTPD.CONF location
    and the .HTACCESS files aren't being parsed at all despite configuration.

  7. #7
    Member
    Join Date
    Nov 2007
    Posts
    865

    Arrow

    Quote Originally Posted by Spiral View Post
    It apparently gets better and better (yes that was sarcasm) ...

    Last night I took apart a server and went over all the configuration
    lines in httpd.conf and the other files loaded and found that the
    configuration for .HTACCESS was indeed accurate in the main
    files but not listed for the virtualhost.

    Thinking the directives might actually need to be in the virtualhost
    sections as well, I ran a few more test with those added and the
    Apache server restarted but no such luck there either but then
    I ran tests with Auth (Deny From / Allow From) directives added
    directly to the httpd.conf file and found those don't work either!

    So in a nutshell, the servers are not only not reading the .HTACCESS
    commands but they apparently are ignoring all authentication commands
    entirely which is now making me wonder if MOD_AUTH was forgotten
    in the Apache Build. If you go into Easy_Apache, it's not listed as a
    build option but you would think Cpanel would know to add that one
    by default into the build.

    Anyway, bottom line is the servers aren't processing any authentication
    commands whatsoever irregardless of .HTACCESS or HTTPD.CONF location
    and the .HTACCESS files aren't being parsed at all despite configuration.

    and what about for plural

  8. #8
    Member
    Join Date
    Nov 2007
    Posts
    865

    Arrow

    Quote Originally Posted by viraj View Post
    You can disable .htaccess for a particular domain by editing the /etc/httpd/conf/httpd.conf file & following the below mentioned steps:

    Open the /etc/httpd/conf/httpd.conf file.
    Search for the "AllowOverride None" string.

    it'd look like :


    Append it by:


    Such that it looks like:

    Doing so would disable the .httaccess for that particular username/domain.
    And what about for plural

  9. #9
    Technical Product Specialist cPanelDavidG's Avatar
    Join Date
    Nov 2006
    Location
    Houston, TX
    Posts
    11,189
    cPanel/Enkompass Access Level

    Root Administrator

    Default

    Quote Originally Posted by Spiral View Post
    It apparently gets better and better (yes that was sarcasm) ...

    Last night I took apart a server and went over all the configuration
    lines in httpd.conf and the other files loaded and found that the
    configuration for .HTACCESS was indeed accurate in the main
    files but not listed for the virtualhost.

    Thinking the directives might actually need to be in the virtualhost
    sections as well, I ran a few more test with those added and the
    Apache server restarted but no such luck there either but then
    I ran tests with Auth (Deny From / Allow From) directives added
    directly to the httpd.conf file and found those don't work either!

    So in a nutshell, the servers are not only not reading the .HTACCESS
    commands but they apparently are ignoring all authentication commands
    entirely which is now making me wonder if MOD_AUTH was forgotten
    in the Apache Build. If you go into Easy_Apache, it's not listed as a
    build option but you would think Cpanel would know to add that one
    by default into the build.

    Anyway, bottom line is the servers aren't processing any authentication
    commands whatsoever irregardless of .HTACCESS or HTTPD.CONF location
    and the .HTACCESS files aren't being parsed at all despite configuration.
    I would recommend working with our technical analysts so they can diagnose what is causing this behavior on your server(s): http://tickets.cPanel.net/submit

  10. #10
    Member viraj's Avatar
    Join Date
    Sep 2006
    Location
    India
    Posts
    209
    cPanel/Enkompass Access Level

    DataCenter Provider

    Wink

    Quote Originally Posted by Spiral View Post
    Actually viraj made a typographical error just as a matter
    of technical correction. The root directory location
    section ("/") of your httpd.conf file has a default setting
    of "AllowOverride All" which means to allow
    .HTACCESS files instead of "AllowOverride None".

    (If you search for "AllowOverride None" in that section
    then you probably wouldn't find anything unless your
    httpd.conf file has already been misconfigured)

    After that, you should indeed put "AllowOverride None"
    in a separate location as viraj told you and that part
    of what they told you is correct. Although a better
    way to do that might be to do it as a vhost include
    file just so you don't have to constantly re-edit your
    main httpd.conf file or have to remember to keep
    it matched up to your actual active accounts.
    Thank you for pointing that out, but I am sure I posted it when I was 100% sure

    Quote Originally Posted by Spiral View Post
    It apparently gets better and better (yes that was sarcasm) ...

    Last night I took apart a server and went over all the configuration
    lines in httpd.conf and the other files loaded and found that the
    configuration for .HTACCESS was indeed accurate in the main
    files but not listed for the virtualhost.

    Thinking the directives might actually need to be in the virtualhost
    sections as well, I ran a few more test with those added and the
    Apache server restarted but no such luck there either but then
    I ran tests with Auth (Deny From / Allow From) directives added
    directly to the httpd.conf file and found those don't work either!

    So in a nutshell, the servers are not only not reading the .HTACCESS
    commands but they apparently are ignoring all authentication commands
    entirely which is now making me wonder if MOD_AUTH was forgotten
    in the Apache Build. If you go into Easy_Apache, it's not listed as a
    build option but you would think Cpanel would know to add that one
    by default into the build.

    Anyway, bottom line is the servers aren't processing any authentication
    commands whatsoever irregardless of .HTACCESS or HTTPD.CONF location
    and the .HTACCESS files aren't being parsed at all despite configuration.
    No matter what you include in the httpd.conf, it wont work :-) Let me know if the solution provided by me didnt work out for you.. Good luck

Similar Threads & Tags
Similar threads

  1. .htaccess help
    By Shane_from_UK in forum cPanel and WHM Discussions
    Replies: 2
    Last Post: 07-12-2010, 11:12 AM
  2. .htaccess help.???
    By hostserve in forum cPanel and WHM Discussions
    Replies: 5
    Last Post: 09-02-2007, 10:27 PM
  3. .htaccess ?
    By Getox in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 12-03-2004, 08:59 AM
  4. .htaccess
    By vishal in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 07-19-2003, 03:04 PM
  5. .htaccess
    By leicon in forum cPanel and WHM Discussions
    Replies: 1
    Last Post: 02-15-2002, 10:14 AM
Linkedin       Facebook       Twitter       RSS       Flickr       YouTube