IIS7: ISAPI Rewrite

Posted on 2009-02-10
Last Modified: 2012-05-06
Hi All,

I have a script i want to run against all traffic for a single website, what is the best way to impliment this within IIS7?

So the script will need to run against all URL variations.

I had thought about changing the error 404, but thought this was a bit untidy.  Could this be achieved using ISAPI Rewrite?

Any other suggestions?
Question by:detox1978
    LVL 22

    Accepted Solution

    I think ISAPI is the way to go.
    Intercept All requests at the root of the site and then pass the request through and process the page.  

    Yes, an error message could also do it ... you could force https or something, do your processing and then pass the request on to something/somewhere else ... but as you said, that would be "messy".  One way that this might actually pass muster is if you do this through a two site scenario.  Intercept all requests with a page cannot be found message, do your processing and then pass the request to another site.

    ISAPI is probably the way to go but the other is completely free   :)
    LVL 2

    Author Comment

    I have Helicon ISAPI Rewrite 3 installed for another site, which I managed to get working (eventually).

    Do you know what the code i would need to put in would be?
    LVL 2

    Author Comment

    Here is the application notes;

    Still lots on what to put....
    LVL 2

    Author Comment

    worked it out... :)
    LVL 22

    Expert Comment

    I'm glad you got it working ... getting the re-write rules right is the hardest part of the process  :)

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How your wiki can always stay up-to-date

    Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
    - Increase transparency
    - Onboard new hires faster
    - Access from mobile/offline

    Suggested Solutions

    Logparser is the smartest tool I have ever used in parsing IIS log files and there are many interesting things I wanted to share with everyone one of the  real-world  scenario from my current project. Let's get started with  scenario - How do w…
    If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
    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.
    To add imagery to an HTML email signature, you have two options available to you. You can either add a logo/image by embedding it directly into the signature or hosting it externally and linking to it. The vast majority of email clients display l…

    759 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

    12 Experts available now in Live!

    Get 1:1 Help Now