I found a strange behavior with TMG 2010 when publishing a website. It appears to rewrite URLs sent outbound to clients when the "send original host header is sent" under certain conditions. Here are those conditions:
Here is precisely what I encountered:
So by process of elimination I found that this appears to be TMG not affecting any host header inbound, nor affecting the alternate URLs outbound.This appears to affect only the main URL outbound, as TMG appears to be rewriting the protocol part of the header when the submitted form returns a redirect from http to https (changing https back to http).
Fixes: Uncheck the "send original host header..." flag and all functionality works correctly. I don't think this is as "clean", because it means that TMG touches every request and changes the host header to the internal host header, however on the IIS bright-side this means the web server will see the same host header no matter what clients request (normalization). The only caveat is that if you wanted to use an internal URL (instead of IP address) for the site that was the same as the external URL it would either not work, or would require a DNS trick on TMG to force it. Or, you could just change the internal URL to something else (not used).
TMG proxy background:
This isn't so much of a bug in TMG as a "feature". TMG is designed to allow external access to internal resources. I've found that it makes a powerful and flexible reverse proxy server, you just have to contend with a few "features". TMG's basic design-premise is based on rewriting URLs that are normally only internally visible, to URLs that are externally visible. This means that TMG errs towards the side of rewriting in exception cases, which this appears to be. This methodology appears to assume that the web servers are dumb, and don't know about external URLs. This premise is fine, except when it is necessary for the web server to perform some type of functionality that requires a complex redirect based on a user action (such as switching to https when a user logs in). TMG assumes that the redirect is internal in nature and blocks the redirect in favor of maintaining the original URL and same-protocol bridging (or more accurately not bridging). This appears to only be an issue when TMG is confused by using the external URL as the internal URL (same as listener and client requests). This shouldn't be an issue when you specify that TMG uses an IP address for the internal site, however it appears that MS has designed TMG to be "smarter" and "more helpful" by performing host header translation outbound, even when you request it no to do so...
Continued here:
TMG 2010 rewriting original host headers when ... - Extropy
- God Is the Machine | WIRED [Last Updated On: June 10th, 2016] [Originally Added On: June 10th, 2016]
- God Is the Machine | WIRED [Last Updated On: June 12th, 2016] [Originally Added On: June 12th, 2016]
- Transhumanism's Extropy Institute - Transhumanism for a ... [Last Updated On: June 15th, 2016] [Originally Added On: June 15th, 2016]
- Extropy Institute Mission [Last Updated On: June 17th, 2016] [Originally Added On: June 17th, 2016]
- Extropy Institute Resources [Last Updated On: July 29th, 2016] [Originally Added On: July 29th, 2016]
- Executive Team | www.extropy.com [Last Updated On: October 1st, 2016] [Originally Added On: October 1st, 2016]
- Current Issue | Asimov's Science Fiction [Last Updated On: November 23rd, 2016] [Originally Added On: November 23rd, 2016]
- Exchange 2010 - www.extropy.com [Last Updated On: November 27th, 2016] [Originally Added On: November 27th, 2016]
- DotNetNuke Skins - Home [Last Updated On: February 19th, 2017] [Originally Added On: February 19th, 2017]
- Greydon Square Extropy Lyrics | Genius Lyrics [Last Updated On: March 11th, 2017] [Originally Added On: March 11th, 2017]
- Extropy SHIFT> [Last Updated On: March 11th, 2017] [Originally Added On: March 11th, 2017]
- Knights of Unicron (SG) - Transformers Wiki - TFWiki.net [Last Updated On: June 28th, 2017] [Originally Added On: June 28th, 2017]
- Basware Annual Partner Awards Announced - Business Wire [Last Updated On: May 24th, 2020] [Originally Added On: May 24th, 2020]
- The essence of Bhagavad Gita: Understanding the significance of sattva-guna, rajo-guna and tamo-guna - Economic Times [Last Updated On: August 26th, 2020] [Originally Added On: August 26th, 2020]
- 12 years ago, Satoshi Nakamoto sent Hal Finney 10 bitcoinsthe first transaction - CoinGeek [Last Updated On: January 15th, 2021] [Originally Added On: January 15th, 2021]
- Markus Guentner: Extropy Album Review | Pitchfork [Last Updated On: November 19th, 2021] [Originally Added On: November 19th, 2021]
- Six Approaches to Making Ethical Decisions in Cases of ... [Last Updated On: March 15th, 2022] [Originally Added On: March 15th, 2022]
- Mission - Humanity+ [Last Updated On: March 15th, 2022] [Originally Added On: March 15th, 2022]
- Surgery helps Yemenese youth shed diapers after 24 years - ThePrint [Last Updated On: March 17th, 2022] [Originally Added On: March 17th, 2022]
- Surgery helps Yemenese youth shed diapers after 24 years ... [Last Updated On: March 29th, 2022] [Originally Added On: March 29th, 2022]