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!

Tracking Redirects

Discussion in 'Workarounds and Optimization' started by denverdataman, Mar 27, 2018.

  1. denverdataman

    denverdataman Member

    Joined:
    Jun 21, 2016
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    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
     
  2. denverdataman

    denverdataman Member

    Joined:
    Jun 21, 2016
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Denver
    cPanel Access Level:
    Root Administrator
  3. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,791
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  4. denverdataman

    denverdataman Member

    Joined:
    Jun 21, 2016
    Messages:
    23
    Likes Received:
    1
    Trophy Points:
    3
    Location:
    Denver
    cPanel Access Level:
    Root Administrator
    Are there any other places that cPanel stores redirects because there appear to be redirects not in the .htaccess. I have also checked at the DNS level.

    Thanks,
    Steve
     
  5. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,711
    Likes Received:
    1,791
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    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.
     
    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