It's a particular pain that cPanel doesn't allow the user to configure DocumentRoot for the primary domain. ISPs, reluctant to change httpd.conf, seem to recommend that you use Apache rewrite rules in public_html/.htaccess to change requests for
www.mysite.com to become
www.mysite.com/subdir - which works but has the downside that all the site's URLs now have "subdir" in their path unless you have some scripting to strip off what Apache added.
Would the following work? The primary domain is actually
mysite.com, so presumably I can use cPanel to define a subdomain named
www.mysite.com. And since it's a subdomain, I can control its DocumentRoot via cPanel. And, finally, to deal with requests directed to
mysite.com, I can add some rewrite rules to public_html/.htaccess to convert requests to
mysite.com to
www.mysite.com. Or maybe I can set up a redirect to do this last bit?
I suspect there is some obvious reason why this wouldn't work. What is it?
Thanks.