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.

Overrule .htaccess regeneration

Discussion in 'General Discussion' started by Remus76, Apr 12, 2016.

  1. Remus76

    Remus76 Member

    Joined:
    Apr 12, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    Hello!
    I have acces to root admin of a webserver, but this is the first time I log in a WHM panel.
    I also must say my knowledge about Linux is poor, and anyway I don't have access to it.
    These are the versions of the software installed.
    • CENTOS 6.7 x86_64 kvm – ns3
    • WHM 54.0 (build 21)
    The problem is the site would really benefit from the gzip feature, but the hosting admin configured regeneration of .htaccess, and he's not available. What can I do to overrule this setting. I don't mind if I need to add the new config rules in WHM once a week.
    I also must say that the owner of the server has many domains on this server. Is it possible to apply these new rules only to certain domains?

    Thank you very much!
     
    #1 Remus76, Apr 12, 2016
    Last edited by a moderator: Apr 12, 2016
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Hello :)

    You can manually edit the .htaccess file via the "File Manager" option in cPanel. Or, the "Optimize Website" feature is available in cPanel if you prefer to avoid manual modifications to the .htaccess files:

    Optimize Website - Documentation - cPanel Documentation

    Thank you.
     
  3. Remus76

    Remus76 Member

    Joined:
    Apr 12, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    I cannot use this option. The hosting admin configured the panel in such a way, the compress option is missing.
    And about .htaccess, I suppose that something is written in httpd.conf and all I can have is just wordpress rewrite rules.
    It is regenerated instantly after every change.
    Other than that, plugins tell me that gzip is available on the server. It's just the htaccess rules that's missing.
     
  4. Remus76

    Remus76 Member

    Joined:
    Apr 12, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    I just found on your link:
    Your system administrator must enable mod_deflate for the Optimize Website interface to appear in cPanel.

    I must find a way to enable it... thanks!
    I could still use some .htaccess rules, so if there is anyone who knows how disable regeneration, it would be cool, thx.
     
  5. Remus76

    Remus76 Member

    Joined:
    Apr 12, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    Just recently found out that only on my domain it was not possible to save another .htaccess, due to a malware that infected all the sites from that account.
     
  6. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
    Were you able to determine the cause of the issue and resume the utilization of the .htaccess file?

    Thank you.
     
  7. Remus76

    Remus76 Member

    Joined:
    Apr 12, 2016
    Messages:
    6
    Likes Received:
    0
    Trophy Points:
    1
    Location:
    Romania
    cPanel Access Level:
    Root Administrator
    I solved the problem. The owner of the domains never cared for security and upgrades, therefore the entire domain was full of malware: base64_decode, eval() and so on. Upgrading php version and deep scan using Wordfence solved all these.
    Regeneration of htacces was just the tip of the iceberg :)

    Thanks for help!
     
  8. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page