FIX: The paths for images, SiteMap nodes, and the <form action=/> tag are rewritten when you use the URL Rewrite Module for IIS 7.0 to rewrite a URL

Article translations Article translations
Article ID: 957660 - View products that this article applies to.
This article also applies to the following product:
  • Microsoft URL Rewrite Module 1.1
Expand all | Collapse all

On This Page

Symptoms

Consider the following scenario:
  • You use the Microsoft URL Rewrite Module for Internet Information Services (IIS) 7.0 to rewrite a URL and to run a child request.
  • You use a relative reference in image paths, in a SiteMap node, or in the <form action=/> tag.
In this scenario, the paths for the image, the SiteMap node, and the <form action=/> tag are also rewritten in the same manner as the URL.

For example, consider the following scenario:
  • You have an Article.aspx file and an Image.gif file in the C:\wwwroot folder. These files are configured to be available through http://localhost.
  • You configure the URL Rewrite rule for URLs like http://localhost/1/AAA to be rewritten as http://localhost/article.aspx?id=1&title=AAA.
  • You display the Image.gif file on the Article.aspx Web page by using <asp:Image runat="server" ImageUrl="Image.gif" />.
When you run the request for http://localhost/1/AAA, the URL is rewritten as http://localhost/article.aspx?id=1&title=AAA. Additionally, the path for the image is rendered as http://localhost/1/AAA/Image.gif. This path is incorrect, and you cannot see the image on the page.

Resolution

Download information

The following files are available for download from the Microsoft Download Center:

Collapse this imageExpand this image
Download
Download the Microsoft URL Rewrite Module for IIS 7.0 (x86) package now.

Collapse this imageExpand this image
Download
Download the Microsoft URL Rewrite Module for IIS 7.0 (x64) package now.

For more information about how to download Microsoft support files, click the following article number to view the article in the Microsoft Knowledge Base:
119591 How to obtain Microsoft support files from online services
Microsoft scanned this file for viruses. Microsoft used the most current virus-detection software that was available on the date that the file was posted. The file is stored on security-enhanced servers that help prevent any unauthorized changes to the file.

Hotfix information

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

To resolve this problem immediately, contact Microsoft Customer Support Services to obtain the hotfix. For a complete list of Microsoft Customer Support Services telephone numbers and information about support costs, visit the following Microsoft Web site:
http://support.microsoft.com/contactus/?ws=support
Note In special cases, charges that are ordinarily incurred for support calls may be canceled if a Microsoft Support Professional determines that a specific update will resolve your problem. The usual support costs will apply to additional support questions and issues that do not qualify for the specific update in question.

Prerequisites

You must have the Microsoft URL Rewrite Module 1.1 installed to apply this hotfix.

Restart requirement

You must restart the computer after you apply this hotfix if any affected files are being used when you install this hotfix. To avoid restarting the computer, exit any ASP.NET websites before you install this hotfix.

Hotfix replacement information

This hotfix does not replace a previously released hotfix.

File information

The English version of this hotfix has the file attributes (or later file attributes) 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 item in Control Panel.
For all supported x86-based versions of IIS URL Rewrite 1.1
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Microsoft.web.management.rewrite.client.dll7.1.490.43297,77614-Sep-093:00x86
Microsoft.web.management.rewrite.dll7.1.490.4368,41614-Sep-093:00x86
Rewrite.dll7.1.490.43110,40014-Sep-093:00x86
For all supported x64-based versions of IIS URL Rewrite 1.1
Collapse this tableExpand this table
File nameFile versionFile sizeDateTimePlatform
Microsoft.web.management.rewrite.client.dll7.1.490.43297,77614-Sep-093:00x86
Microsoft.web.management.rewrite.dll7.1.490.4368,41614-Sep-093:00x86
Rewrite.dll7.1.490.43143,66414-Sep-093:00x64

Workaround

To work around this problem, you can use the absolute address when you refer to the resource. For the example that is described in the "Symptoms" section, you can modify the ImageUrl property from "Image.gif" to "/Image.gif" or "~/Image.gif."

Status

Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the "Applies to" section.

More information

For more information about the Microsoft URL Rewrite Module for IIS 7.0, visit the following Microsoft Web site:
http://learn.iis.net/page.aspx/460/using-url-rewrite-module/

Properties

Article ID: 957660 - Last Review: September 21, 2012 - Revision: 3.0
Applies to
  • Microsoft .NET Framework 2.0
Keywords: 
kbhotfixserver kbexpertiseadvanced kbqfe kbsurveynew KB957660

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com