0

My organization has the following setup:

Now, we aim to decouple the Drupal pages from the static ones. But due to a strange policy from our hosting provider, this will mean that the HTML pages will have to be moved to an external hosting.

To be:

From what I understood, it's easy to achieve this by creating a new subdomain (e.g. https://static-stuff.example.com/whatever) and then a redirection. But is there a way to achieve this without altering the URLs? What type of changes would be required on the Apache and DNS settings?

Thanks a lot!

Darius
  • 1
  • Does this answer your question? [How can I forward requests from my web server?](https://serverfault.com/questions/1035016/how-can-i-forward-requests-from-my-web-server) – Gerald Schneider Oct 09 '20 at 10:41

1 Answers1

0

A browser will go to whatever IP address www.example.com resolves to in the DNS.

The server running at that address will need to act as a proxy to fetch the static content, or redirect the browser to the external location. There are various ways to do this using HAProxy, mod_proxy, Apache RewriteRules, etc.

However, there is no way to get www.example.com to resolve to different IP addresses based on the path (URL).

tater
  • 1,395
  • 2
  • 9
  • 12