I had a Drupal project where the website is hosted in shared web hosting and the issue was all its page's URL contains root path like for example:
http://example.com/home/roland/public_html/contact (this URL should only be http://example.com/contact if without root path). We know that in shared hosting we don't have control in Apache web server's configuration files but we do only have the .htaccess to do some Apache stuffs. How can we remove the root path
/home/roland/public_html from all our Drupal site's URL?
To solve this issue, open and edit your
.htaccess file. Search and uncomment the line that contains the following: