In the domain a directory is shown instead of the index of the web

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.

  • cpanel, problems
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

SSL Certificates

What is an SSL certificate? An SSL...

Activate Domainkeys and SPF

This article is valid for WHM / cPanel To...

Add IP address to SPF records

When working with SPF records, you may need to add additional IP addresses to...

Addon Domains

An Additional Domain allows a new domain name to be linked to a subdirectory of your account. The...

Antispam System Operation

All our Shared Hosting servers (cPanel Reseller Plans and End Users) are now equipped with a...