Sending all requests to index.php using IIS

Posted on 2011-10-06
Last Modified: 2012-05-12

We've developed a CMS that uses a .htaccess file to redirect all requests to an index.php file so that we can create SEO friendly urls.

One of our clients wants us to host the CMS on their own server which is running IIS, the problem is, the CMS is developed for Apache.

I'm just wondering if anyone knows how we can redirect all requests (apart from files that exist) to index.php

I've attached the .htaccess file we're using.
RewriteEngine on

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ index.php?rt=$1 [L,QSA]

Open in new window

Question by:SheppardDigital
    LVL 9

    Expert Comment

    You could use URL Rewrite Rule Module for achieving similar results.

    Further information on Rewrite Rule Module can be found at the following URL

    Author Comment

    Is this also available for IIS6?
    LVL 9

    Accepted Solution

    No this is available for IIS 7 only.

    However, in case you want to target IIS6 I would suggest you to visit  for (Ionic's Isapi Rewrite Filter).

    Hope this helps.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    6 Surprising Benefits of Threat Intelligence

    All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

    Suggested Solutions

    First of all, clustering IIS is something you should rarely consider doing. In almost all cases, Microsoft Network Load Balancing (NLB) ( is a much better solution when you need to p…
    What is an ISAPI filter?   •      It's an assembly (.dll file) that can add or change the way IIS works.   •      They can be enabled globally for your web server or on a site-by-site basis.   When the IIS server receives a request, enabling the ISAPI fi…
    It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
    This video is in connection to the article "The case of a missing mobile phone (". It will help one to understand clearly the steps to track a lost android phone.

    779 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now