Skip to main content

Bulk Overwrite .htaccess file in all user accounts?

Comments

6 comments

  • cPanelMichael
    Hello, Replacing the existing .htaccess files is not recommended. These files may already include entries related to features offered in cPanel & WHM (e.g. MultiPHP, Redirects, Optimize Website). This is generally something you'd want to handle on a per account basis. Thank you.
    0
  • Sujoy Dhar
    Dear, I am respecting the codes inside the cpanel root and adding some other codes too for optimization thats why I need the command to run in ssh, if you could help me I will be highly appreciated !
    0
  • cPanelMichael
    Hello, That level of modification would involve developing a custom bash script that searches for the .htaccess files and appending those files with a specific entry. I recommend reaching out to a qualified system administrator for help with this, as it's outside the scope of support we can offer: Thank you.
    0
  • linux4me2
    It looks like at least some of what he's wanting to include in his .htaccess files could go in Home -> Service Configuration -> Apache Configuration -> Include Editor -> Previrtual Host Include -> All Versions. Would that work?
    0
  • Sujoy Dhar
    Yeah @cPanelMichael will it work ?
    0
  • cPanelMichael
    It looks like at least some of what he's wanting to include in his .htaccess files could go in Home -> Service Configuration -> Apache Configuration -> Include Editor -> Previrtual Host Include -> All Versions. Would that work?

    Yes, that is one alternative and matches the steps referenced by another customer at: Thank you.
    0

Please sign in to leave a comment.