{"id":228097,"date":"2017-07-15T07:39:27","date_gmt":"2017-07-15T11:39:27","guid":{"rendered":"http:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/uncategorized\/tmg-2010-rewriting-original-host-headers-when-extropy.php"},"modified":"2017-07-15T07:39:27","modified_gmt":"2017-07-15T11:39:27","slug":"tmg-2010-rewriting-original-host-headers-when-extropy","status":"publish","type":"post","link":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/extropy\/tmg-2010-rewriting-original-host-headers-when-extropy.php","title":{"rendered":"TMG 2010 rewriting original host headers when &#8230; &#8211; Extropy"},"content":{"rendered":"<p><p>    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:  <\/p>\n<p>    Here is precisely what I encountered:  <\/p>\n<p>    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).  <\/p>\n<\/p>\n<p>    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).  <\/p>\n<\/p>\n<p>    TMG proxy background:  <\/p>\n<p>    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...  <\/p>\n<p><!-- Auto Generated --><\/p>\n<p>Read more:<\/p>\n<p><a target=\"_blank\" rel=\"nofollow\" href=\"http:\/\/www.extropy.com\/forums\/knowledge-bases-extropedia\/microsoft\/tmg-2010-rewriting-original-host-headers-when-told-not\" title=\"TMG 2010 rewriting original host headers when ... - Extropy\">TMG 2010 rewriting original host headers when ... - Extropy<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p> 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).  <a href=\"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/extropy\/tmg-2010-rewriting-original-host-headers-when-extropy.php\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"limit_modified_date":"","last_modified_date":"","_lmt_disableupdate":"","_lmt_disable":"","footnotes":""},"categories":[431644],"tags":[],"class_list":["post-228097","post","type-post","status-publish","format-standard","hentry","category-extropy"],"modified_by":null,"_links":{"self":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/posts\/228097"}],"collection":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/comments?post=228097"}],"version-history":[{"count":0,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/posts\/228097\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/media?parent=228097"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/categories?post=228097"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.euvolution.com\/futurist-transhuman-news-blog\/wp-json\/wp\/v2\/tags?post=228097"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}