Skip to main content

Trouble turning off a redirect

Comments

6 comments

  • cPRex Jurassic Moderator
    Hey there! You don't need to restart Apache for changes to the .htaccess file as those files are read in real-time by the system. However...do you happen to have nginx installed and running? That would cache the site data and would cause the redirect to continue to happen. If so, you can clear the cache for the domain right sidebar inside the account's cPanel interface.
    0
  • Jelf
    Thanks for the .htaccess tip. No, nginx is not installed. Any suggestion for where else I can look for this redirect so I can turn it off?
    0
  • cPRex Jurassic Moderator
    The first thing I would do is confirm it's not something in your local browser. If you have another browser, or a separate device like a phone or tablet, that would be the easiest thing to check. If that still isn't working, I would try accessing the site with a Curl command to see what type of redirect is in place. For example, here is what we get when checking Google: # curl https://google.com 301 Moved

    301 Moved

    The document has moved here.

    That code shows us a 301 redirect happening. I'd do that to confirm there is an actual redirect on the server-side still in place. If so, it's possible there is another .htaccess at /home/username causing confusion, instead of /home/username/public_html.
    0
  • Jelf
    Yes, I tried different devices - same problem. curl displays the custom 401 page for the domain pointed to by the redirect.
    0
  • Jelf
    Solved. Turned out the problem was not a typical redirect. Instead the domain at issue had the wrong 'document root' The solution was to use cPanel > Domains. I unassigned the domain at issue and then deleted the corresponding subdomain. Then I was able to reassign the domain and use the correct directory.
    0
  • cPRex Jurassic Moderator
    I'm glad you were able to track that down!
    0

Please sign in to leave a comment.