ISAPI Rewrite Filter - need help

I'm looking for the best example for a regular expression to change requests going to http://mywebsite/map/# to http://mywebsite:81/test.htm?map=# where # will be an integer supplied by an application. Can anyone help me with this expression?

Thanks,
I have read the document extensively but I need a kind of starting point to begin testing. Again to reiterate, I want to send all requests from http://mywebsite/map/# to http://mywebsite:81/test.htm?map=# with map being an integer from 0-1000000

I am using Isapi Rewrite Lite.
thanks in advance and I will be indebted to anyone who can get me started....

Cheeso wrote:
I suggest you read the doc,
check the examples and tests, and play with the testdriver.exe

I decided not to use Isapi Rewrite Lite and instead switched to IIRF.

I read through your doc, put my rule in the IsapiRewrite4.ini file (see below), placed both the IsapiRewrite4.ini file and the IsapiRewrite4.dll in a subdir, and deployed the dll manually using the IIS Manager. Some logs were written which perhaps you can better
interpret. I am confused about the process. I downloaded the binary version not the source assuming that the binary already had the regexpression built in. I only modified the IsapiRewrite4.ini file. Is that enough or do I need to build a new executable? Just
a bit of backround. I am running this on a server with 2 websites, one running on port 80 and the other on port 81. Right now all I get is the page not found error. My log is copied below the filter.
thanks in advance

mjeffe wrote:
Cheeso,
If I am just providing a URL redirect rule, do I need to compile my own dll or can I just edit the .ini file and put my rule in there? I am just slightly confused about the application of using the compiled vs. the uncompiled version. I am guessing that I don't
need the source for a hard coded redirect but I could be wrong...

To use IIRF, you just need to install the binary and configure the ini file.
The source is there for the case where you want to change how IIRF works.

mjeffe wrote:
I decided not to use Isapi Rewrite Lite and instead switched to IIRF.

I read through your doc, put my rule in the IsapiRewrite4.ini file (see below), placed both the IsapiRewrite4.ini file and the IsapiRewrite4.dll in a subdir, and deployed the dll manually using the IIS Manager. Some logs were written which perhaps you can better
interpret. I am confused about the process. I downloaded the binary version not the source assuming that the binary already had the regexpression built in. I only modified the IsapiRewrite4.ini file. Is that enough or do I need to build a new executable? Just
a bit of backround. I am running this on a server with 2 websites, one running on port 80 and the other on port 81. Right now all I get is the page not found error. My log is copied below the filter.
thanks in advance

You only need the binary. you configure it by editing the ini file.

From my reading of your log, you passed http://my.server.edu/PUCampus.html as a URL to the server.
And what you got out was no rewrite.
Look at the line in your log that reads:

Wed Apr 23 12:49:52 2008 - Rule 1 : -1 (No match)

This means your REGEX does not match the passed-in URL. And examining the regex, there should be no surprise about that.

Your regex looks for URLs that begin with /map/. And /PUCampus.html does not begin with /map/.

The next thing - thank you for thoroughly reading through the readme file. Writing doc is sometimes a thankless job, and every doc writer appreciates it when someone reads the doc they wrote.

But I would ask that you read the Readme one more time. The example for redirection shows very clearly how you should be specifying the URL pattern to match. In particular, you should not be including the server name in the URL pattern. Also, the redirection
target should include the scheme (Http).

The URL pattern - that is to say the first argument to the RewriteRule directive - matches the URL without the leading Server DNS name. What I mean is, if a user types http://my.server.org/Document.htm into their web browser, the URL you receive at the server
is /Document.htm, and your URL pattern should match THAT. Your URL pattern should not attempt to match the leading scheme ("http") nor the server name ("my.server.org").

thanks. I made the switch and got it to work. I apologize for the initial approach to solving my problem, which was to not look at the documentation. After reading and getting your feedback I have a solution for my customer.