1 Reply Latest reply on Jul 18, 2008 9:32 PM by Shail Goel-Oracle

    Change host field in header in includes

      Hi there.

      Is it possible to change host in headers for included fragment?
      For example, i have some "blackbox" application on, and second instance on Instances are independent, but both need to "listen" on host "www.someblackbox.com".
      So i need something like this:

      <esi:include src="">
      <esi:request_header name="host" value="www.someblackbox.com"/>

      <esi:include src="">
      <esi:request_header name="host" value="www.someblackbox.com"/>

      But this doesnt work.. Is somehow possible to force own host field?

        • 1. Re: Change host field in header in includes
          Shail Goel-Oracle
          Bit late reply but if you are still looking for answer:

          The better approach would be to simply in OHS set the ServerName on both to www.someblackbox.com . That way OHS will normalize whatever host header is sent from Web Cache into ww.someblackbox.com . If you are not using OHS, that should work with any Apache based server. Don't know about IIS or SunOne.

          One other idea would be to set up two SITE definitions. With path based sites. Then the includes could specify hostname directly instead of IP address. For example:

          <esi:include src="http://www.someblackbox.com/something/special.jsp">

          <esi:include src="http://www.someblackbox.com/something/other.jsp">

          Then you don't even need the "esi:request header" stuff anymore.

          Create one SITE: www.someblackbox.com/something/special.jsp

          and another SITE: www.someblackbox.com/something/other.jsp

          And have them map to different origin servers. It would be nicer if the path prefix could be different for the two servers. For example:

          SITE one: www.someblackbox.com/content_from_server1

          SITE two: www.someblackbox.com/content_from_server2