Last week I have recorded a video screencast that shows how to use URL Rewrite Module for IIS 7.0 to perform some common URL manipulations tasks. Today this video has been published on IIS.NET - check it out at this location.
The video demonstrates how to create rewrite rules to perform the following tasks:
- Enabling user friendly and search engine friendly URLs for dynamic web pages;
- Enforcing canonical host names, so that site visitors as well as search engines always use a particular domain name for your web site;
- Using rewrite maps to define static mappings between requested and rewritten URLs;
- Blocking unwanted site crawlers by aborting requests based on HTTP user-agent header.
In addition, the video shows how to test, troubleshoot and debug rewrite rules by using “Test pattern” tool and IIS 7.0 Failed Request Tracing.
Please take a look and leave comments or questions if anything is not clear or you would like to get more information on a particular topic.
ruslany on September 19th 2008 in URLRewrite
123 views
Today IIS team has made the Go Live release of URL Rewrite Module for IIS 7.0 available for download. This release contains significant functionality and performance improvements and it is believed to have a quality level suitable for production deployments.
Download the Go Live release of the module today!
Microsoft URL Rewrite Module for IIS 7.0 Go Live (x86)
Microsoft URL Rewrite Module for IIS 7.0 Go Live (x64)
Note that the installer for URL Rewrite Module includes the FastCGI update for IIS 7.0. If this update has not been yet installed on your machine it will be installed together with URL Rewrite Module.
Continue Reading »
ruslany on September 11th 2008 in URLRewrite
269 views
Today I have published two new articles on http://learn.iis.net. The articles are intended to explain the differences between various URL manipulation technologies available in IIS 7.0 and to provide help with choosing of the technology best suited for a particular usage scenario.
Here is the short summary of the articles:
- IIS 7.0 URL Rewriting and ASP.NET Routing - with the release of URL-rewrite module for IIS 7.0 and the inclusion of ASP.NET routing into the .NET Framework 3.5 SP1, there have been a lot of questions from ASP.NET developers about how these two features relate to each other and when to use each. This article describes the differences between these two technologies and provides guidance for Web developers on when to use IIS URL rewriting and when to use ASP.NET routing.
- IIS 7.0 Request Filtering and URL Rewriting - IIS 7.0 includes a request filtering module that is based on the URLScan ISAPI Filter for IIS 6.0. The module helps you tighten security of your Web servers. The URL rewrite module, even though its primary purpose is to rewrite URL paths for requests, can also be used as a security enforcement tool that helps prevent access to Web site content. The article compares security related features of these two modules and explains how to choose among them when securing your web server.
Please take a look and leave comments or questions if anything is not clear or you would like to get more information on a particular topic.
Acknowledgements: I want to thank Phil Haack from ASP.NET team and Nazim Lala from IIS team for reviewing the articles and providing great feedback. Also I thank Mike Pope for very high quality editing of the articles.
ruslany on September 4th 2008 in URLRewrite
328 views
IIS team has recently released an update for IIS 7.0 FastCGI module that fixes compatibility problems with several popular PHP applications. In particular, the update changes the behavior of FastCGI module in the following ways:
- REQUEST_URI server variable set by FastCGI module now includes query string and path info. Previously, lack of the query string in this server variable caused the popular CMS application Drupal to not work with FastCGI on IIS 7.0
- REQUEST_URI server variable now contains the originally requested URL path before any URL rewriting was performed. Prior to this fix, the server variable used to contain a final rewritten URL, which caused problems when using URL rewriting to enable “pretty permalinks” for popular blog engine Wordpress.
Note that above mentioned problems do not exist in IIS 6.0 FastCGI Extension, which always has been setting the REQUEST_URI server variable correctly.
The update is available for download from the following locations:
Warning: if your PHP application was coded in a way so that it relied on the REQUEST_URI server variable to contain the requested URL without a query string or to contain the final rewritten URL, then installing this update may break your application. Before applying the update, please make sure that your application does not rely on incorrect behavior of FastCGI module.
Acknowledgements: I want to thank IIS team members (Anil Ruia, Won Yoo, Yamini Jagadeesan) for providing this update and Zend Technologies team (Stanislav Malyshev) for validating the changes in FastCGI module.
ruslany on August 26th 2008 in FastCGI, PHP
565 views
If you ever tried to set up Ruby on Rails (RoR) on IIS 7.0 with FastCGI you have probably noticed that the process is not very straightforward. There are a few workarounds that need to be applied in order for RoR to function correctly. In particular, handling of static files in your web application can be tricky on IIS 7.0. The problem is that RoR uses clean URL’s that look similar to this: http://mysite.com/home/about. In order for RoR to be invoked for this kind of URL’s it is necessary to create a “catch all” handler mapping in IIS (that is a handler mapping with path attribute set to “*“). When you create such a handler mapping it will cause requests for static files to be routed to RoR, which will obviously fail to handle them.
For RoR to work correctly on IIS with FastCGI it needs to behave like a 404 handler, meaning that it should be invoked only if the requested URL does not exist as a file on a physical file system. The default IIS configuration does not allow this kind of configuration, so there are several workarounds available today - this article describes them in great details. However, these workarounds are either not recommended for production usage or are not easy to configure. In this post I will explain how URL Rewrite Module for IIS 7.0 can be used to configure IIS and RoR to work correctly with static files.
Continue Reading »
ruslany on August 7th 2008 in FastCGI, URLRewrite
533 views