Hello all.
I am migrating a site to CentOS 7, Cpanel 82.0.16. To set up the site, I am wanting my public_html to be set up like so:
Where the directory root of the main domain is set for ./public_html/example.com. In order to accomplish this, I have enacted the changes shared in this thread:
forums.cpanel.net
I have changed the documentroot line to "/home/USERNAME/public_html/example.com", as well as the cgi-bin line to the same.
However, after committing these changes, as well as rebuilding and restarting apache, the server is not redirecting browsers correctly. In firefox, it throws the error:
To attempt to rectify a possible issue with the domain not using the www. prefix, I have committed the following code to an .htaccess file in ./public_html
Ideally, one would be able to adjust the directory root natively in WHM or CPanel, but I have not found a method to do that.
Thank you for any help you'll be able to give.
I am migrating a site to CentOS 7, Cpanel 82.0.16. To set up the site, I am wanting my public_html to be set up like so:
Code:
public_html
-> 1sub.example.com
-> 2sub.example.com
-> example.com
Change root directory for the main domain?
Here's my situation: I need a URL shortener I like Polr best Polr requires changing root directory to wherever_it_is_copied/public I can't find a way to change the root directory for the main domain My hosting plan doesn't allow add-on domains So, do I have to forget about Polr or is there...
I have changed the documentroot line to "/home/USERNAME/public_html/example.com", as well as the cgi-bin line to the same.
However, after committing these changes, as well as rebuilding and restarting apache, the server is not redirecting browsers correctly. In firefox, it throws the error:
Code:
The page isn’t redirecting properly
Firefox has detected that the server is redirecting the request for this address in a way that will never complete.
This problem can sometimes be caused by disabling or refusing to accept cookies.
Code:
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*) [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
order allow,deny
allow from all
Thank you for any help you'll be able to give.
Last edited by a moderator: