SendOriginalHostHeader Property of the IFPCWebPublishingProperties Interface

The SendOriginalHostHeader property gets or sets a Boolean value that indicates whether Forefront TMG sends the original HTTP Host header or a Host header corresponding to the name or IP address specified in the WebSite property of the rule.

[C++]
HRESULT put_SendOriginalHostHeader(
	VARIANT_BOOL fSendOriginalHostHeader
);
HRESULT get_SendOriginalHostHeader(
	VARIANT_BOOL* pfSendOriginalHostHeader
);

Parameters

pfSendOriginalHostHeader

Pointer to a Boolean variable that is set on return to VARIANT_TRUE if Forefront TMG sends the original HTTP Host header, or to VARIANT_FALSE if Forefront TMG sends a Host header corresponding to the name or IP address specified in the WebSite property of the rule.

fSendOriginalHostHeader

Boolean value that indicates whether Forefront TMG sends the original HTTP Host header or a Host header corresponding to the name or IP address specified in the WebSite property of the rule. The default value is VARIANT_FALSE.

Return Value

These property methods return S_OK if the call is successful; otherwise, they return an error code.

[Visual Basic]
Property SendOriginalHostHeader As Boolean

Property Value

Boolean value that indicates whether Forefront TMG sends the original HTTP Host header or a Host header corresponding to the name or IP address specified in the WebSite property of the rule. The default value is False.

Example Code

The following VBScript code fragment sets SendOriginalHostHeader to True for the first policy rule if it is a Web publishing rule.
' Define the constant needed
Const fpcPolicyRuleWebPublishing = 2
' Create the root object.
Dim root  ' The FPCLib.FPC root object
Set root = CreateObject("FPC.Root")
' Declare the object needed.
Dim rule			' An FPCPolicyRule object
Set rule = root.GetContainingArray.ArrayPolicy.PolicyRules(1)
If rule.Type = fpcPolicyRuleWebPublishing Then
	rule.WebPublishingProperties.SendOriginalHostHeader = True
	rule.Save
End If

Remarks

This property is read/write. Its default value is False (VARIANT_FALSE in C++).

By default, Forefront TMG sends a Host header corresponding to the published site, that is, a Host header corresponding to the name or IP address specified in the WebSite property of the rule, rather than the original Host header that Forefront TMG received. However, there are scenarios where the published servers rely on the Host header to generate links on a page instead of generating relative links. These servers must receive the original Host header with the domain name or IP address that is reachable by the client. This property allows those Web servers to receive the original Host header.

Requirements

Client Requires Windows Vista or Windows XP.
Server Requires Windows Server 2008.
Version Requires Forefront Threat Management Gateway (TMG).
IDL

Declared in Msfpccom.idl.

DLL

Requires Msfpccom.dll.

See Also

FPCWebPublishingProperties


Send comments about this topic to Microsoft

Build date: 11/30/2009

© 2008 Microsoft Corporation. All rights reserved.