Recent Blogs

  • Why A Travel Company Needs An Attractive Website?

    A website considered a great source of a marketing platform for a travel company. It is a place where you can share your availability and regularity all the time without unusual hindrances. A website should be responsive, user-friendly, and easy to operate. A travel company promotes itself through the best website to put trustworthy content. It may promote visitors and it would be a great platform to place tour packages.

    Why travel agencies needs a attractive website


How to Change Website Document Root?

When you visit a website, you are accessing a particular folder on a web server. For example, when you visit, the server is pulling up the files at: /home/example/public_html. The web server only serves up the files located at that folder to incoming visitors. The location of that web folder is called the “document root”.
That specific location of the web folder is the document root and is set by the Apache configuration. But what if you wanted to change that location? cPanel’s default location may not serve your needs or you simply want to reorganize. In any case, I’ll show you how to make that change on cPanel.

Changing Addon Domains

There are two types of domains on a cPanel box that can have document roots: Main (primary) domains and Addon domains. Changing the document root for Addon domains is easy. Simply log into your cPanel and navigate to: Domains >> Addon domains.

How to Change Website Document Root?

Next, edit the Addon domain path. To do so, simply click the edit icon next to the path, and type in your new path.

Changing Primary domains (Dedicated Server)

For changing the main/primary domain, you will need to have root SSH access and be able to locate and edit the following file (replacing your user & domain info):

1. Once you have opened the file, look for the following line:
documentroot: /home/USERNAME/public_html
2. Modify the location according to your needs. Save it and exit.
3. Rebuild the Apache conf and restart Apache:
service httpd restart
The change will be immediate. Simply clear your browser cache and force refresh the page!

Change document root using .htaccess

The public_html (most case) directory is 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 in the public_html folder:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^$ [NC,OR]
RewriteCond %{HTTP_HOST} ^$
RewriteCond %{REQUEST_URI} !folder-path/
RewriteRule (.*) / folder-path /$1 [L]
In the above lines you should replace the following 2 strings: - Type your own domain name folder-path - Type the name of the sub-folder which has the test/development website If you are running php website you may require below two lines also, RewriteCond %{HTTP_HOST} ^(www.)?$ RewriteRule ^(/)?$ folder-path /index.php [L]

Leave a Reply

Your email address will not be published. Required fields are marked *