Trouble turning off a redirect
I had a simple .htaccess file to redirect domain #1 to domain #2. It worked fine.
I changed that .htaccess file to remove the redirect and restarted apache.
Yikes! The redirect is still happening.
Where else should I look on my server to turn off that redirect?
I have root access.
-
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 -
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 -
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 Moved301 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 -
Yes, I tried different devices - same problem. curl displays the custom 401 page for the domain pointed to by the redirect. 0 -
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 -
I'm glad you were able to track that down! 0
Please sign in to leave a comment.
Comments
6 comments