document root – ChemiCloud Knowledge Base & Self-Support Center https://chemicloud.com/kb Wed, 25 Mar 2020 14:42:30 +0000 en-US hourly 1 https://wordpress.org/?v=6.7.2 https://chemicloud.com/kb/wp-content/uploads/2019/06/favicon_rk1_icon.ico document root – ChemiCloud Knowledge Base & Self-Support Center https://chemicloud.com/kb 32 32 How to Redirect Your Domain to a Subfolder Using .htaccess https://chemicloud.com/kb/article/how-to-redirect-your-domain-to-a-subfolder-using-htaccess/ https://chemicloud.com/kb/article/how-to-redirect-your-domain-to-a-subfolder-using-htaccess/#respond Fri, 19 Jul 2019 10:46:19 +0000 https://chemicloud.com/kb/?post_type=ht_kb&p=2310 In this tutorial, we are going to show you a simple way to redirect your primary domain to a subfolder on that domain. For the purposes of this tutorial, it will redirect to a subfolder at /blog.

This is useful if your WordPress blog is installed to a subfolder and you want the main domain to forward to it.

In your public_html folder (also called the “root directory” or “document root”), you need to create a file called .htaccess. You can do so by using the File Manager in cPanel.

From this file, we are going to use a few lines to redirect those requests in a search engine friendly way.

Add the following lines to that file:

RewriteEngine On
RewriteCond %{HTTP_HOST} ^(www.)?yourdomain.com$
RewriteRule ^(/)?$ blog [L]

The only change you need to make is to change “yourdomain.com” to your domain. This will then redirect everything from the domain to the folder /blog at that domain. If you want to change that folder just edit the “blog” part.

]]>
https://chemicloud.com/kb/article/how-to-redirect-your-domain-to-a-subfolder-using-htaccess/feed/ 0
Where Do I Need to Upload My Website Files? https://chemicloud.com/kb/article/where-do-i-need-to-upload-my-website-files/ https://chemicloud.com/kb/article/where-do-i-need-to-upload-my-website-files/#respond Fri, 19 Jul 2019 10:38:40 +0000 https://chemicloud.com/kb/?post_type=ht_kb&p=2308 Your website file must be uploaded into the public_html directory, which is, in general, the document root folder for your primary domain name associated to the hosting service.

If you are hosting additional domains, which are added as Addon domains or sub-domains in cPanel, they have their own document root folder and should be found in account’s home directory (above public_html).

You can easily locate the document root for an addon domain from cPanel > Domains > Addon Domains and look at Modify Addon Domain section.

As for any sub-domains, you can easily locate the document root from cPanel > Domains > Subdomains > Modify a Subdomain section.

]]>
https://chemicloud.com/kb/article/where-do-i-need-to-upload-my-website-files/feed/ 0