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!

Delete lines from .htaccess file after suspend

Discussion in 'cPanel Developers' started by Mo9a7i, Nov 1, 2009.

  1. Mo9a7i

    Mo9a7i Registered

    Nov 1, 2009
    Likes Received:
    Trophy Points:
    Hello everyone,

    I have the "Options" directive blocked from httpd.conf so that clients can't use that in their home directories for security reasons.

    The problem is, when account is suspended using cpanel, cpanel creates an .htaccess file that includes the following:
    "RedirectMatch .* http://${host}/\n";
    "Options -Includes -Indexes -ExecCGI\n";

    and that creates a "500 internal server error" if the options directive is blocked.
    I've read the /scripts/suspendacct script and found the lines responsible for the creation of .htaccess
    I have deleted the line that contains "Options -Includes -Indexes -ExecCGI\n";

    but i think cpanel keeps updating that file whenever it upgrades /scripts/upcp

    I even tried adding some instructions in the /scripts/postupcp file that tries to comment that specific line but it doesn't seem to be working.

    I'm not aware about upcp process so i'm not sure how to solve this problem and thats why i really need your help

    can you provide me with the best solutions for this problem and if /scripts/postupcp is enough, what could be the command that can solve my problem?


    Mohannad Otaibi

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