Website and sub-domains split between IP addresses

I am using cloudflare name-servers and have my website and its sub-domains split between two IP addresses.

One server has hosted domains, so the IP resolves to the correct sub-domains even though CloudFlare sends each sub-domain to that same IP.

The other server, which hosts only ONE sub-domain of the website, is more of an issue. There are no hosted domains, 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.

So, I tried redirecting to that. This only works when attempting to load the sub domain in a browser. However, if I attempt to access a sub-folder in that same sub-domain, it doesn’t work.

How do I set this up in Apache, via .htaccess, so that not only will the root of the sub-domain work, but also any sub-folders? (e.g.: Subdomain.website.com works but subdomain.website.com/folder 1, etc. do not)

Your help is greatly appreciated. Thank you.

Cloudflare does not run Apache. If you need tech support for your Apache server, stackoverflow.com or serverfault.com might have the answers.

This topic was automatically closed after 31 days. New replies are no longer allowed.