title: .htaccess for website using multiple servers/IPs for different subdomains
body: <p>I am using cloudflare name-servers for my website and subdomains, and have my website and its sub-domains split between two IP addresses.</p>
  <p>One server/IP has hosted domains (and a managed hosting provider, with cpanel), so the IP resolves to the correct sub-domains even though CloudFlare sends each sub-domain to that same IP.</p>
  <p>The other server, that is a Centos8 self-installed non-managed server (VPS), which hosts only ONE sub-domain of the website, is more of an issue.</p>
  <p>There are no hosted domains and no cpanel installed, so it resolves to the root folder of the IP address provided to Cloud Flare. However, the actual directory corresponding to the root of that sub-domain, is two levels up in the directory structure, and not in the root.</p>
  <p>So, I tried using the .htaccess file to redirect to that folder. This only works when attempting to load the sub domain itself in a browser.</p>
  <p>However, if I attempt to access a sub-folder in that same sub-domain (via a link on the website, or by typing into the url field of the browser), it doesn't work, and gives a file not found error, although the folder is present.</p>
  <p>How do I set this up in Apache, via .htaccess, so that not only will the root of the sub-domain work (with proper masking, i.e. it will not show the folder structure in the url field, but just the subdomain, i.e. subdomain.domain.com, not subdomain.domain.com/folder1/folder2), and also any sub-folders? (e.g.: Subdomain.website.com works but subdomain.website.com/folder 1, etc. do not)</p>
  <p>Any help is greatly appreciated.  Thank you!</p>