Archive for July, 2008

Scripting URL rewrite module configuration

URL rewrite module fully utilizes extensibility of IIS 7.0 configuration system. The rewrite rules are stored in applicationHost.config and web.config files in XML format. This provides a huge benefit of being able to use rich set of IIS 7.0 management tools and API’s for managing and scripting URL rewriter configuration. For example, you can automate any configuration task, including creating, editing and deleting of rewrite rules, by:

The Configuration Editor, included in the Administration Pack for IIS 7.0, greatly simplifies the process of generating scripts for automating URL rewriter configuration. In this post, I will demonstrate how to use the Configuration Editor to automate configuration of rewrite rules.

Continue Reading »

4 Comments »

ruslany on July 27th 2008 in URLRewrite

16,234 views

PoorFairAverageGoodExcellent (6 votes, average: 4.00 out of 5)

IIS.NET uses URL rewrite module

IIS.NET team has been very proactive in helping us out with testing of URL rewrite module. In fact, they even agreed to deploy the latest build of the module on the production server that hosts http://www.iis.net. This kind of real-life deployments really helps us validate the features and functionality of the module. And being able to do this validation so early in release cycle gives us a good opportunity to adjust the feature set, re-consider some of the design decisions, or just find some very good bugs.

IIS.NET has URL rewriting requirements, which are typical for large content management systems. The articles on the site are often moved or updated and the old links should continue to work. Or there is a need to have a nice URL (for example – http://www.iis.net/fastcgi) for a page that currently has some meaningless URL (e.g. http://www.iis.net/downloads/default.aspx?tabid=34&g=6&i=1521). IIS.NET has more than a hundred of such URL mappings. Majority of those mappings are static, so there is no need to use regular expression patterns, capture groups, back-references or any other advanced URL rewriting stuff. Rewriting logic is very simple:- for example if input URL is “/php” then rewrite it to “/default.aspx?tabid=50001″. But if we tried to define this logic by creating a rewrite rule per URL mapping we would end up with more than a hundred of rules, which would be evaluated for every request. That would kill the performance of the web site.

Continue Reading »

4 Comments »

ruslany on July 18th 2008 in URLRewrite

29,052 views

PoorFairAverageGoodExcellent (5 votes, average: 5.00 out of 5)

Per-site PHP configuration with IIS FastCGI

There have been a few questions on IIS.NET PHP forum regarding enabling per-site PHP configuration. This is a common requirement when running PHP applications in shared hosting environment, because each PHP application may require a different set of PHP settings. Shared hosting providers often want to provide their customers with an option of controlling PHP configuration if necessary.

Until recently, it was thought that per-site PHP configuration was only possible when running PHP on Apache in *nix based OS. However, with FastCGI module it is possible to enable this for PHP applications hosted on IIS 6.0 and IIS 7.0.

The development team at GoDaddy.com has researched and validated several options for enabling per-site PHP configuration on Windows. Based on their findings, we have updated the PHP shared hosting guide with instructions on how to allow per-site php.ini files when running PHP via FastCGI on IIS 7.0. In this post I will explain how to accomplish the same on IIS 6.0 by using FastCGI extension.

Continue Reading »

17 Comments »

ruslany on July 12th 2008 in FastCGI, PHP

77,337 views

PoorFairAverageGoodExcellent (5 votes, average: 4.40 out of 5)

Introduction

My name is Ruslan Yakushev. I am a program manager on IIS team, working on some of the very interesting projects that are being developed in the team right now. I have joined the team about a year ago, and was thinking about starting a blog for a while now. The primary work responsibilities kept me busy, so I have been postponing blog idea for a while. Every time I needed to make an announcement or an update on IIS community site, I asked some of my colleagues  on the team to blog my content. Finally, I figured that I should probably start my own blog, so I could have all the freedom of publishing my own content any time I want.

Being a technical program manager on the team, I like to use (in other words – “dogfood”) the products that team develops. Hence I decided to self-host my own blog by using latest version of IIS. Also, I have been working with FastCGI and PHP for a while now, and became quite familiar with many popular PHP applications. As a result I chose to run my blog by using latest version of WordPress, which is a very nice and easy to use blog engine application. Finally, I am using my favorite feature of IIS 7.0 – URL rewriter – to enable “pretty permalinks” on my blog.

I plan to use this blog to publish information related to FastCGI, PHP, URL rewriter and IIS in general. I hope you’ll find this content useful.

No Comments »

ruslany on July 10th 2008 in Other

11,958 views

PoorFairAverageGoodExcellent (4 votes, average: 5.00 out of 5)

Recently Published Articles