sagnik Posted April 8, 2020 Posted April 8, 2020 Hello Admins, I request you to change the document root of my main domain as I've too many addon-domains it will be better to keep them organized. So kindly give a response telling that if it's possible or not. Because I don't know how the websites are hosted in heliohost but if the websites are configured as VirtualHosts then it might be possible. I know that there are some rules for every request, I don't know if my request complies with the rules of heliohost as I've not seen such a rule there, it's also possible that I might be the first one here who's requesting to change the document root of the main domain.
wolstech Posted April 8, 2020 Posted April 8, 2020 cPanel does not support changing the main domain's document root. It must always point to public_html. 1
Piotr GRD Posted April 11, 2020 Posted April 11, 2020 This *is* annoying in cPanel.But there are two other options (only second one is possible on HelioHost) to have all domains files (including main one) in separate folders. First option to deal with it in cPanel is to have all addon domains pointed to the folders outside of the main public_html. This is *intentionally* not possible on HelioHost. Second option is to use .htaccess rewrite engine. Create new "maindomainfolder" folder inside of public_html, move all main domain files in there and directly in public_html create .htaccess with something like: RewriteEngine On RewriteBase / RewriteCond %{HTTP_HOST} ^(www\.)?maindomain\.com$ RewriteRule ^(.*)$ /maindomainfolder/$1 [L]There may be conflict with other rewrite rules in other .htaccess files inside that folder, some modifications of them may be needed to reflect folder changes. 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now