denverdataman

Active Member
Jun 21, 2016
33
2
8
Denver
cPanel Access Level
Root Administrator
I have a series of domains attached to one site root. The customer has set up redirects using cPanel and there are also redirects in the .htaccess file. The problem is there appear to be redirects happening that come from the either. Is there a way to track where the redirect comes from.

For example, http://somesite.com redirects to Apache2 Debian Default Page: It works. Did this happen because of a redirect in cPanel or a redirect in the .htaccess file?

Thanks,
Steve
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Did this happen because of a redirect in cPanel or a redirect in the .htaccess file?
Hello,

Configuring a redirect in cPanel automatically adds the corresponding entry to the .htaccess file, so technically the .htaccess file is used in both cases. You'll likely want to remove the current redirect rules in the .htaccess file and configure them manually. Here are a couple of third-party URLs you may find helpful:

HTACCESS - Exclude certain domains
.htaccess mod_rewrite - how to exclude addon domain from rewrite rule?

Thank you.
 

cPanelMichael

Technical Support Community Manager
Staff member
Apr 11, 2011
47,911
2,233
363
cPanel Access Level
DataCenter Provider
Twitter
Hello Steve,

Make sure you check the .htaccess files in the document root of the individual subdomains as well. Other than that, the only other place where you may find a redirect is a custom Apache virtual host entry:

Modify Apache Virtual Hosts with Include Files - EasyApache 4 - cPanel Documentation

It's possible to manually add a custom virtual host entry using information in the above documentation, but note it's not something that can be generated through the cPanel & WHM UI.

Thank you.