Subdomain outside of public_html

kimass

Registered
Jun 18, 2019
1
0
1
Serbia
cPanel Access Level
Website Owner
Hi,

I have shared hosting with one main website (wordpress) and a couple of subdomains. Main site is in the root (public_html).

When I install subdomain, cpanel put the instalation here: mysite.com/mysubdomain. I would like to have complete subdomain instalation files out of public_html, but keep the url mysite.com/mysubdomain.

Thanks for your help.

Best regards
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,542
207
343
Chesapeake, VA
cPanel Access Level
DataCenter Provider
I do not think that would be possible. You might be able to get away with manually creating that folder in your public_html and then use a url rewrite in the htaccess to rewrite it back to the subdomain.
 

GOT

Get Proactive!
PartnerNOC
Apr 8, 2003
1,542
207
343
Chesapeake, VA
cPanel Access Level
DataCenter Provider
Agree with @DennisMidjord however, you still won't also be able to access the subdomain as mysite.com/mysubdomain without some kind of rewrite.
 
  • Like
Reactions: DennisMidjord