• 1 reply
  • Latest Post - ‏2013-07-12T15:01:21Z by swlinn
81 Posts

Pinned topic Host Alias in Datapower

‏2013-07-12T14:43:20Z |

I have a question about something that I'm stuck on.

I have a Multi Gateway Protocol in the Datapower Configuration.

Incoming Request uses a Host Alias name :

eg.     in which  is mapped to (for example),.

In the probe , inbound-url is

However, I really need to get the value "" in a variable so that I can use in one of my transformation XSL to do a redirect .

I tried "var://service/URL-in" , and so on , but all of them only give the actual IP (, not the name that I use as "Host Alias".

Please let me know if there's a way to grab the DNS value or Host Alias value in datapower in a variable.

Thank you

  • swlinn
    1348 Posts

    Re: Host Alias in Datapower


    Get the Host HTTP Request Header, which should contain the domain name used in your url, ie,

    <xsl:variable name="myhost' select="dp:http-request-header('Host')"/>

    Note that you'll have whatever was placed into the url by the client, in your case, but if the client explicitly specifies the port, you'll have that as well, eg,