Ruby on Rails in IIS 7.0 with URL Rewriter

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.