Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how do I know what version of IIS7 URL Rewrite module is installed

I created a rewrite rule in IIS7 that uses the trackAllCaptures="false" attribute in the conditions element and uses outboundRules. All works fine on my test system however when I deploy these rules to GoDaddy I get the error:

Unrecognized attribute 'trackAllCaptures'  

And if I include the outboundRules node I get a 500 error from the server. I spoke with their support and they insist that they have support for the 2.0 version of the URL Rewrite module. My question is how do I verify or communicate to them how to check the version of this module? I can't find a way anywhere short of attempting to install it on how to check the version.

I'm attempting to rewrite URL's for an ASP.Net application not WordPress in order to remove the sub-folder from the URL this is a very prevalent issue in their multi-domain hosting. The sample I am using is located here: http://weblogs.asp.net/owscott/archive/2010/05/26/url-rewrite-multiple-domains-under-one-site-part-ii.aspx

like image 432
blkbam Avatar asked Aug 05 '12 00:08

blkbam


People also ask

How do you check URL Rewrite is installed?

Checking if the URL Rewrite module is installed To see if the URL Rewrite module is installed, open IIS Manager and look in the IIS group - if the module is installed, an icon named URL Rewrite will be present.

How do you check rewrite module is enabled or not in IIS?

Click on Control Panel. Click on Program & Features. Enable IIS from the Add/Remove feature from the control panel if it is not selected at first. After enabling IIS, Install the URL Rewrite module if it is not previously installed.

What is the IIS URL Rewrite Module?

About the URL Rewrite module The Microsoft URL Rewrite Module 2.0 for IIS 7 and above enables IIS administrators to create powerful customized rules to map request URLs to friendly URLs that are easier for users to remember and easier for search engines to find.


1 Answers

The binary for Url Rewrite is located at:

 %SystemRoot%\system32\inetsrv\rewrite.dll 

Url Rewrite 1.1 has a File Version of 7.1.490.43.
Url Rewrite 2.0 has a File Version of 7.1.761.0 or 7.1.871.0 (there may be others but these are the two different versions I know of).

If you don't have console access to verify the version number try running the following code in a simple web page:

Assembly a = Assembly.Load("Microsoft.Web.Iis.Rewrite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); Response.Write(a.FullName); 

If UrlRewrite 2.0 is installed then you'll see something like:

 Microsoft.Web.Iis.Rewrite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35 

If it isn't then you'll get an exception thrown:

Could not load file or assembly 'Microsoft.Web.Iis.Rewrite, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The system cannot find the file specified.

You could also point them at this documentation page:

Tracking Capture Groups Across Conditions

This paragraph makes it pretty clear that trackAllCaptures is a 2.0 specific setting and if it isn't working then 2.0 is definitely not installed:

In URL Rewrite Module 2.0, it is possible to change how capture groups are indexed. Enabling trackAllCaptures setting to on the <conditions> collection makes the capture groups form all matched conditions to be available through the back-references.

like image 145
Kev Avatar answered Oct 04 '22 08:10

Kev