How to change my document root folder?


EXPERIENCING PROBLEMS WITH OUR SERVICES? RUN A DIAGNOSE FIRST TO SAVE YOURS AND OUR TIME

Added: 04.01.2017 14:57:31     Last updated: 03.12.2021 14:44:40

By default your website is loaded from the public_html folder of your account. The public_html directory is also called web root folder or document root folder.
If you've created a test website under a sub-folder and you want it to be displayed when you type your domain name, add the following lines to the .htaccess file (sometimes this needs to be created, the file might also be hidden) in the public_html folder:

RewriteEngine on
RewriteCond %{HTTP_HOST} ^exampledomain.org$ [NC,OR]
RewriteCond %{HTTP_HOST} ^www.exampledomain.org$
RewriteCond %{REQUEST_URI} !folder/
RewriteRule (.*) /folder/$1 [L]