You are currently offline, waiting for your internet to reconnect

Your browser is out-of-date

You need to update your browser to use the site.

Update to the latest version of Internet Explorer

IIS generates courtesy redirect when folder without trailing slash is requested

This article was previously published under Q298408
SYMPTOMS
When a browser requests a URL such as http://www.servername.de/SubDir, the browser is redirected to http://www.servername.de/SubDir/. A trailing slash is included at the end of the URL.
CAUSE
Internet Information Server (IIS) first treats SubDir as a file that it should give back to the browser. If this file cannot be found, IIS checks to see if there is a directory with this name. If a directory with this name exists, a courtesy redirect with a 302 "Object moved" response message is returned to the browser. This message also contains the information about the new location of the directory with the trailing slash. In turn, the browser starts a new GET request to the URL with the trailing slash.

With this slash at the end of the URL, IIS treats this as a directory and tries to obtain either the default document from this directory or, if no default document exists, returns the directory listing or a "Directory listing denied" error message.
MORE INFORMATION
When a browser requests a virtual directory that does not contain a trailing slash, Internet Information Services (IIS) 6.0 returns an HTTP 301 "Moved Permanently" message. This behavior permits the client to append the trailing slash on later requests to the virtual directory.
Properties

Article ID: 298408 - Last Review: 12/03/2007 15:57:00 - Revision: 5.2

  • Microsoft Internet Information Server 4.0
  • Microsoft Internet Information Services 5.0
  • Microsoft Internet Information Services 5.1
  • Microsoft Internet Information Services 6.0
  • kbprb kbpending KB298408
Feedback
://c1.microsoft.com/c.gif?DI=4050&did=1&t="> var varCustomerTracking = 1; var Route = "76500"; var Ctrl = ""; document.write(" ame('head')[0].appendChild(m);" onload="var m=document.createElement('meta');m.name='ms.dqp0';m.content='false';document.getElementsByTagName('head')[0].appendChild(m);" src="http://c1.microsoft.com/c.gif?">