Why UseCanonicalName Directive are set Off?


Unconfigured Ad Widget

  • Filter
  • Time
  • Show
Clear All
new posts
  • ryan
    • Jun 2008
    • 96

    Why UseCanonicalName Directive are set Off?

    Why UseCanonicalName Directive are set Off?

    A canonical name is the properly denoted host name of a computer or network server.

    Syntax:UseCanonicalName On|Off|DNS
    Default:UseCanonicalName Off

    In many situations Apache server must construct a self-referential URL -- that is, a URL that refers back to the same server. With UseCanonicalName On Apache will use the hostname and port specified in the ServerName directive to construct the canonical name for the server. This name is used in all self-referential URLs, and for the values of SERVER_NAME and SERVER_PORT in CGIs.

    With UseCanonicalName Off Apache will form self-referential URLs using the hostname and port supplied by the client if any are supplied (otherwise it will use the canonical name, as defined above). These values are the same that are used to implement name based virtual hosts, and are available with the same clients. The CGI variables SERVER_NAME and SERVER_PORT will be constructed from the client supplied values as well.

    An example where this may be useful is on an intranet server where you have users connecting to the machine using short names such as www. You'll notice that if the users type a shortname, and a URL which is a directory, such as www/splat, without the trailing slash then Apache will redirect them to www(dot)domain(dot)com/splat/.
    But if UseCanonicalName is set Off, then Apache will redirect to www/splat/.
    Last edited by Marc_AccuWebHosting; 12-28-2017, 10:57 AM.

Debug Information