I don't know exactly what you want, but here are my two answers:
Answer 1: You want your DocumentRoot
to point to public_html
In this case add/change the DocumentRoot
in your (virtual) host config of your webserver (I'm assuming you're using Apache, which would be /etc/httpd/conf/httpd.conf
or /etc/httpd/conf/extra/httpd-vhosts.conf
or even /etc/apache2/sites-enabled/yourhost
)
Answer 2: You want to redirect from your subdomain
folder to the root of public_html
This is not possible via a simple RewriteRule
due to the fact, that your host is pointing to the subdomain
folder. The other way round would possible (redirecting from public_html
to subdomain
).
What you can to is to create a symbolic link from subdomain
which points to public_html
or a file in it - but I don't recommend this.
Furthermore resources: