« Previous Next »

Thread: Error in documentation: HTTP_HOST server variable

Last post 07-14-2008 12:44 PM by ruslany. 1 replies.

Average Rating Rate It (5)

RSS

Page 1 of 1 (2 items)

Sort Posts:

  • 07-12-2008, 2:33 PM

    Error in documentation: HTTP_HOST server variable

    I was trying to use URL Rewrite Module Configuration Reference as a guide for composing my first rewrite rules using Microsoft URL Rewrite Module for IIS 7.0 CTP1 (x86).  I discovered an error in the document.  (I do l-o-v-e the module!  Very nice.)

    The section Accessing URL Parts from a Rewrite Rule states,

    "The HTTP_HOST server variable will contain http://www.mysite.com/"

    My experimentation indicated that the HTTP_HOST server variable does not contain:

    • the URI scheme (protocol),
    • the two forward slashes and the colon that delimit the scheme and the hostname,
    • or the forward slash that trails the hostname.

    I believe the contents of the server variable are correct; therefore, the statment should be:

    "The HTTP_HOST server variable will contain www.mysite.com"

    Cordially,

    Lee C.

  • 07-14-2008, 12:44 PM In reply to

    • ruslany
    • Top 25 Contributor
    • Joined on 07-01-2007, 7:38 PM
    • Redmond, WA
    • Posts 661

    Re: Error in documentation: HTTP_HOST server variable

    Thanks cichanlx for pointin that out! You are correct, the HTTP_HOST does not contain protocol prefix, forward slashes and trailing slashes. I have corrected it in the article.

    http://ruslany.net
Page 1 of 1 (2 items)
Microsoft Communities