To solve this error follow the instructions below:
-In the .htaccess file put the following code:
RewriteEngine on
RewriteCond %{REQUEST_URI} !^/domain.com/
RewriteRule (.*) /domain.com/$1 [L]
Replacing "domain.com" by the domain in question, since it is the name of the folder in which the web data is contained.
-If the .htaccess file does not exist, create it with the indicated code.
Remember that to view files like .htaccess from the cPanel file manager you must check the option "Show Hidden Files (dotfiles: .example)." when opening the file manager. Similarly, to connect via FTP you must do so in safe mode so that the server allows the connection.
Note: the .htaccess file must be located in public_html.