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.

Can I stop cPanel from creating redirect rules from .htaccess?

Discussion in 'General Discussion' started by jeremyers1, Oct 5, 2013.

  1. jeremyers1

    jeremyers1 Member

    Joined:
    Oct 5, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    I have a domain with several add-on domains. Each add-on domain has it's own .htaccess file with numerous redirects in the file.

    I just switched hosting companies, and in the new hosting company, I noticed that the cPanel "redirects" section has copied over all the rules from the various .htaccess files.

    If I try to delete or disable these rules from the cPanel "Redirects" section, it either deletes them from the .htaccess file also, OR it cannot the delete (or disable) the rule at all.

    How can I disconnect the cPanel "Redirects" section from the various .htaccess files so that I can have some redirects in the cPanel, and have DIFFERENT domain-specific redirects in the .htaccess files?
     
  2. quietFinn

    quietFinn Well-Known Member

    Joined:
    Feb 4, 2006
    Messages:
    998
    Likes Received:
    10
    Trophy Points:
    18
    Location:
    Finland
    cPanel Access Level:
    Root Administrator
    cPanel redirects are done using .htaccess files, so what you described is not possible.
     
  3. jeremyers1

    jeremyers1 Member

    Joined:
    Oct 5, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Yes, I understand that cPanel uses .htaccess. But the issue is that I was at one host that used cPanel, and then moved over to another host that also uses cPanel. All the file directories and organization of files were exactly the same between the two. Yet on the first host, the .htaccess rules did not get imported into the cPanel redirects section and on the second host they are getting imported. There must be some setting or something which is causing this?
     
  4. jeremyers1

    jeremyers1 Member

    Joined:
    Oct 5, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    On a related note... maybe it is a WHM setting I am looking for?
     
  5. jeremyers1

    jeremyers1 Member

    Joined:
    Oct 5, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: Redirects & Rewrites - .htaccess & cPanel - questions

    Is it possible to stop cPanel from utilizing .htaccess to create the redirects? Maybe a setting in WHM?

    I just switched hosting companies, and in the new hosting company, I noticed that the cPanel "redirects" section has copied over all the rules from the various .htaccess files.

    If I try to delete or disable these rules from the cPanel "Redirects" section, it either deletes them from the .htaccess file also, OR it cannot the delete (or disable) the rule at all.

    I feel like it must be possible somehow, because I recently switched from one hosting company to another. Both used cPanel. All the file directories and organization of files were exactly the same between the two. Yet on the first host, the .htaccess rules did not get imported into the cPanel redirects section and on the second host they are getting imported. There must be some setting or something which is causing this?
     
  6. jeremyers1

    jeremyers1 Member

    Joined:
    Oct 5, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    It turns out it was a WHM setting.

    In WHM, I went to "Server Configuration > Tweak Settings > System > Depth to recurse for .htaccess checks

    And set it to "0"
     
  7. jeremyers1

    jeremyers1 Member

    Joined:
    Oct 5, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: Redirects & Rewrites - .htaccess & cPanel - questions

    It was a WHM setting.

    In WHM, I went to "Server Configuration > Tweak Settings > System > Depth to recurse for .htaccess checks

    And set it to "0"
     
  8. jeremyers1

    jeremyers1 Member

    Joined:
    Oct 5, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Re: Redirects & Rewrites - .htaccess & cPanel - questions

    Never mind. That did NOT work after all.
     
  9. jeremyers1

    jeremyers1 Member

    Joined:
    Oct 5, 2013
    Messages:
    9
    Likes Received:
    0
    Trophy Points:
    1
    cPanel Access Level:
    Root Administrator
    Never mind. That did not work after all.
     
Loading...

Share This Page