Exclusively for you!! Trial version of Google Apps, Apply Coupon-CNHPGX6T6QRWGV!!

IIRF.ini for URL rewriting

writing @Image courtesy of cooldesign/ FreeDigitalPhotos.net

IIRF.ini for URL rewriting

Welcome to CodeSpread!

We often hear the terms like URL rewriting or friendly URLs. There are many techniques available to achieve it and we will discuss one of those today, IIRF.

What is URL rewriting?

Before we try to understand URL rewriting, we should first understand a term called SEO friendly URLs,Read more about it here. When Google and Yahoo spiders start indexing the page, they take various parameters in account for indexing the page and one of the most important parameter is URL. URL should be more user friendly and human readable. For example,

A URL like codespread.com/article?p=123 is not human readable or user friendly, it should be rewritten something like codespread/article/know-url to get a better search ranking/indexing.

Above explanation fulfils the need of URL rewriting.

How can it be achieved?

URL rewriting can be achieved by either with ISAPI filters at the IIS Web server level, or with either HTTP modules or HTTP handlers at the ASP.NET level. We are going to focus on ISAPI filter at the IIS web server level.

We have a free and open source ISAPI filter for IIS URL rewriting from Ionic: IIRF: Ionic’s ISAPI Rewriting Filter. It installs as an ISAPI Filter on the IIS server.

Note:IIS servers do not support URL rewriting by default. IIS7 servers support native component for URL rewriting.

Refer this beautiful article to install ISAPI filter. http://wiki.gxtechnical.com/commwiki/servlet/hwiki?How+to+install+URL+Rewrite,

In IIS7, URL rewrite will be seen as,


In II6, IIRF.dll can be seen inside ISAPI filters property. Both option uses IIRF.dll for basic filter. After this, we just need to edit the configuration file ‘IIRF.ini’ to establish rules.

What is IIRF.ini?

‘ini’ file is a simple text file with an extension of ‘Initialization’. It provides the settings for the sites which is the configuration information normally referred to as the rules. These rules describe how to rewrite or redirect URLs and headers.

For each site,at least one IIRF.ini is necessary. It is required to locate the IIRF.ini file in the root physical path for each web site or web application.

IIRF uses regular expression for rules like \d, \D, \w, \W, \s, \S. An example:


This is a basic introduction to IIRF. There is more information and examples available at http://iirf.codeplex.com/wikipage?title=Examples

Author: hershey

A passion for knowledge drives me to do programming, A passion for programming drives me to create something different, A passion for creation drives me to spread the knowledge.

Share This Post On


  1. nice superb explaination

    Post a Reply
  2. thanks for the tutorial
    I am having a problem.
    The feature “Create SQL server database” isn’t available , I can’t select it.
    Can you help, please ?

    Post a Reply

Submit a Comment

Your email address will not be published. Required fields are marked *

More from CodeSpread:

  • How to add alias and create virtual directory?How to add alias and create virtual directory?There is a term very famous in IIS world 'virtual directory', but before discussing a virtual directory, we should be familiar with the term 'alias'.By definition, an object can have alternative na...
  • IIS- Still learning!IIS- Still learning!Whenever we receive some error which is related to IIS, we just jump on internet as we lack the basic concepts of IIS and i can definitely say that we almost ignore IIS and focus ourselves on devel...
  • I definitely want to know how my application gets aired on internet.I definitely want to know how my application gets aired on internet.In the client facing environment , I have got used of requests like that from clients.These situations require considerable amount of time to think and before saying something,precaution should be ...
  • IIS Pre-ArticleIIS Pre-ArticleI thought of sharing few articles on IIS so when I started my mission, I realized that there should be some basic tasks related to IIS which needs to be done by the user before diving deep into IIS...
  • App_Offline Updates in Webdeploy V3 and Visual Studio 2013App_Offline Updates in Webdeploy V3 and Visual Studio 2013Please refer Don’t Mess with App_Offline article to see the usefulness of App_Offline. Treat the below article as an update to the concepts and basics shared earlier. After going through visual ...
  • How to create a MVC 2 Project in VS2010?How to create a MVC 2 Project in VS2010?How to create a MVC 2 Project in VS2010? 1. Open VS2010. 2. Select File -> New Project. 3. Select Visual C# -> Web -> ASP.NET MVC 2 Empty Web Application. Name it as MyMvcApplicat...
  • Creation of DemoSpaceCreation of DemoSpaceThe Backend URL shown in the article : NetBiscuits: How fascinating can it be to create a mobile website? is the Demospace server location where the Published files of the applications will be plac...
  • Don’t Mess with App_OfflineDon’t Mess with App_OfflineOne of the most useful features of ASP.NET is the "App_Offline.htm" . It provides a much easy way to make the ASP.NET application offline while we do our modifications on the site. How we do it? ...