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

jeremyers1

Member
Oct 5, 2013
9
0
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?
 

quietFinn

Well-Known Member
Feb 4, 2006
1,222
87
178
Finland
cPanel Access Level
Root Administrator
cPanel redirects are done using .htaccess files, so what you described is not possible.
 

jeremyers1

Member
Oct 5, 2013
9
0
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?
 

jeremyers1

Member
Oct 5, 2013
9
0
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?
 

jeremyers1

Member
Oct 5, 2013
9
0
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"
 

jeremyers1

Member
Oct 5, 2013
9
0
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"