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!

.htaccess is being overwritten by version control. Solutions to prevent this?

Discussion in 'General Discussion' started by spaceman, Apr 27, 2018.

  1. spaceman

    spaceman Well-Known Member

    Joined:
    Mar 25, 2002
    Messages:
    494
    Likes Received:
    2
    Trophy Points:
    318
    Hi.

    For the second time in a month or so, a client of ours has reported that the URL redirects he setup in cPanel have disappeared.

    The answer: both times we patched the (Drupal) site using version control, and this caused the .htaccess file to get overwritten.

    The challenge here is that, ideally, or at least from a version control perspective, clients shouldn't be allowed to make file changes to the live site. And yet, when they make use of the cPanel feature that allows them to setup URL redirects (and doubtless some other cPanel features), they get to, unwittingly, make file changes directly to the live version of their site.

    We could remove this (and other) features from cPanel that allows them to do this. But we don't think this is reasonable, because some clients want the freedom to do this themselves.

    So perhaps we have to change the way we manage version control?

    How have others addressed this issue please?

    Thanks,

    Ross

    p.s. For this particular client we've implemented a workaround which we think is solid: we moved the subdomain (that was being redirected from) outside of the public_html folder, then re-added the redirects. But that's a very specific solution for this client. We need a more general purpose solution for all clients.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,961
    Likes Received:
    1,821
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Hello @spaceman,

    We'll begin adding support for Git version control in cPanel & WHM version 72. You can read more about this under "Best Answer" in the comments section of the following feature request:

    Allow users to install websites from version control

    Let us know if you have any questions about how this will work.

    Thanks!
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

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