Symptoms
You may find in a document root without content, redirects do not occur. Your filesystem may look something along the lines of:
[~ /home/user/public_html]cPs# ls -lah
total 20K
drwxr-x---. 3 user nobody 4.0K Aug 3 09:55 .
drwx--x--x. 17 user user 4.0K May 15 15:33 ..
-rw-r--r-- 1 user user 3.3k Aug 3 09:55 .htaccess
drwxr-xr-x. 3 user user 4.0K Oct 26 2017 .well-known
Description
Redirects created within the Redirects interface of cPanel add to the .htaccess file. If there is existing content within this .htaccess file, you may find that your redirects are never performed for the domain in question.
Workaround
If your document root does not have content aside from .htaccess, and the .well-known directory for HTTP DCV, then it is likely that the other content within .htaccess is not necessary. If this is your case, then it would be best to move the .htaccess file aside and recreate your redirect. To move it aside:
mv -v .htaccess .htaccess.bak
All that this will do is rename your .htaccess file with the ".bak" extension, and prevent Apache from loading its contents. From there, recreate your redirect from within the Redirects interface of the cPanel account. Your redirect should occur afterwards, if there are no other underlying issues.
Comments
0 comments
Article is closed for comments.