Microsoft KB Archive/331069

= Hotfix to Permit URL Path Redirection in Web Publishing Rules =

Article ID: 331069

Article Last Modified on 6/14/2007

-

APPLIES TO


 * Microsoft Internet Security and Acceleration Server 2000 Service Pack 1
 * Microsoft Internet Security and Acceleration Server 2000 Standard Edition

-



This article was previously published under Q331069



SYMPTOMS
When you use Web Publishing Rules to publish an internal Web site, you cannot redirect the URL path to a different path on the internal Web server.

Note In this article, the path is defined as that portion of the URL that appears between the first and the last forward slash characters (/) in the URL.

For example, when you create a Web Publishing Rule that uses the following Destination Set

http:// /

ISA Server automatically redirects the request to the internal Web server as follows, where  is the name of your Web site:

http:// /

Therefore, you cannot use paths to direct incoming requests to the root directory of an internal Web site. In this scenario, the Web site content must be stored in the  folder instead of in the root directory.



CAUSE
This issue occurs because ISA Server passes the original URL path unchanged to the internal Web site.



RESOLUTION
A supported hotfix is now available from Microsoft. However, this hotfix is intended to correct only the problem that is described in this article. Apply this hotfix only to systems that are experiencing this specific problem. This hotfix might receive additional testing. Therefore, if you are not severely affected by this problem, we recommend that you wait for the next service pack that contains this hotfix.

To resolve this problem, submit a request to Microsoft Online Customer Services to obtain the hotfix. To submit an online request to obtain the hotfix, visit the following Microsoft Web site:

http://go.microsoft.com/?linkid=6294451

Note If additional issues occur or any troubleshooting is required, you might have to create a separate service request. The usual support costs will apply to additional support questions and issues that do not qualify for this specific hotfix. To create a separate service request, visit the following Microsoft Web site:

http://support.microsoft.com/contactus/?ws=support

The English version of this fix has the file attributes (or later) that are listed in the following table. The dates and times for these files are listed in coordinated universal time (UTC). When you view the file information, it is converted to local time. To find the difference between UTC and local time, use the Time Zone tab in the Date and Time tool in Control Panel.

Date        Time   Version            Size    File name

08-May-2003 21:24  3.0.1200.266      178,448  Mspadmin.exe 08-May-2003 21:23  3.0.1200.266      103,184  Msphlpr.dll 09-May-2003 00:45  1.0                19,572  Pathmappingeditor.hta 08-May-2003 21:23  3.0.1200.266      391,440  W3proxy.exe 08-May-2003 21:24  3.0.1200.266      299,280  Wspsrv.exe

This hotfix permits you to remove some or all of the URL path, beginning with the first forward slash character (/), when you publish a Web site. For example, by creating a path mapping to remove the / / portion of the following URL, you can configure ISA Server to translate the following

http:// /

to:

http://

Consider the following examples:  When you specify a path mapping of / / / to remove / / / from the incoming Web request, the following URL

http://www.example.com/site1/site2/site3/

is translated as:

http://Web01/site3

 When you specify a path mapping of / / / to remove / / / from the request, the following URL

http://www.example.com/site1/site2/site3/

is not correctly translated because the mapping does not locate a match starting with the first forward slash character. For example, the path mapping tries to locate /site2/ as the start of the path mapping, but the URL starts with /site1/.

After you install this hotfix, use the ISA Server Path Mapping Editor to configure the path mappings. This tool is a Hypertext Application (.hta) program that is installed in the default ISA Server installation folder (typically, C:\Program Files\Microsoft ISA Server) when you install this hotfix. You can use this tool to add path mappings for any Web Publishing Rule for stand-alone ISA servers or in ISA Server arrays. To add a path mapping, follow these steps.

Note After you install this hotfix, ISA Web Proxy Logging changes. The cs-uri field contains the mapped data, not the original request.

Important To enable the functionality provided by this hotfix, you must install ISA Server Feature Pack 1. For information about how to obtain ISA Server Feature Pack 1, visit the following Microsoft Web site:

http://www.microsoft.com/downloads/details.aspx?familyid=2f92b02c-ac49-44df-af6c-5be084b345f9&displaylang=en

For information about how to obtain Service Pack 1 (SP1) for ISA Server, visit the following Web site:

http://www.microsoft.com/technet/downloads/isa/2000/servicepacks/sp1.mspx

Additionally, Microsoft recommends that you install Microsoft Internet Explorer 6.0 or later to support the functionality of the Path Mapping Editor.
 * 1) Create the Destination Set and Web Publishing Rule by using the ISA Management utility.
 * 2) Start the ISA Server Path Mapping Editor. To do this, run the PathMappingEditor.hta program from the ISA Server installation folder.
 * 3) In the ISA Server or Array list, click the ISA Server computer that you want to map the path on.
 * 4) In the Web Publishing Rule list, click the Web Publishing Rule that you want to configure.

Note You cannot define a path mapping for the &quot;Default rule&quot; Web Publishing Rule.
 * 1) Click Add to add a new path mapping.
 * 2) Type the prefix that you want to have removed from the URL path. For example, type / /.

Note The prefix must start with a forward slash character (/) and end with a forward slash character.
 * 1) Click OK.
 * 2) Quit the ISA Server Path Mapping Editor Tool.

Note Microsoft recommends that you define only one path translation for each Web Publishing Rule. In the case where you must map both / / and / / / in the Path Mapping Editor Tool, create two Web Publishing Rules and related Destination Sets -- one for each path mapping that you define.

Path translation does not extend to multiple instances of the specified string. ISA Server searches for the first instance of the particular path mapping, and then replaces it. For example, when you create a path mapping of / /, the following URL

http://www.example.com/site1/site2/site1

is translated as follows:

http:// /site2/site1

Important The ISA Server Path Mapping Editor Tool rejects path definitions that violate the Request For Comments (RFC) 2396 path restrictions.



WORKAROUND
To work around this issue, use the instructions in the following Microsoft Knowledge Base article to redirect Microsoft Internet Information Services (IIS) subfolders to the Web root folder:

310177 HOW TO: Redirect IIS 5.0 Subfolders to a Web Root Folder in Windows 2000



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



MORE INFORMATION
 The Path Mapping Editor does not support the addition of a path mapping to the &quot;Default rule&quot; Web Publishing Rule. Additionally, you cannot use wildcard characters or Regular Expression definitions in the path.</li> ISA Server is designed to comply with RFC guidelines. RFC 2616, section 5.1.2 specifies the following:

A transparent proxy MUST NOT rewrite the &quot;abs_path&quot; part of the received Request-URI when forwarding it to the next inbound server, except as noted above to replace a null abs_path with &quot;/&quot;.

For additional information about RFC 2616, visit the following Network Working Group Web site:

http://www.faqs.org/rfcs/rfc2616.html

For additional information about RFC 2396, visit the following Network Working Group Web site:

http://www.faqs.org/rfcs/rfc2396.html

</li> Microsoft recommends that you confirm Path Mapping definitions with your Web-site developers before implementation. You want to make sure that you do not inadvertently break client-redirection links that may be applied. For example, consider a sample IIS Web site with the following virtual roots:  /

This contains an introduction to the Web site and has links to /Path  for other content.</li> /Path1

This contains Error.asp error content.</li> /Path 

This contains various other content.</li></ul>

In this example, where all Web pages reference /Path1 for error message handling, ISA Server is configured to Web Publish the server by using a Destination Set of  , /Path1/* and a path mapping of /path1/.

A client visits the root Web site and is directed to /Path2. During the session, the client causes an error and is redirected to /Path1/error.asp. However, /Path1 is a mapped path. Therefore, the client is actually sent to /error.asp and receives a &quot;404 Error&quot; error message because Error.asp does not exist in the root.</li></ul>

Microsoft provides third-party contact information to help you find technical support. This contact information may change without notice. Microsoft does not guarantee the accuracy of this third-party contact information.

Keywords: kbhotfixserver kbqfe kbqfe kbbug kbfix KB331069

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.