I'm trying to do something pretty simple in iirf.
I want all requests that are missing the www. prefix to have it added.
This is my IsapiRewrite4.ini:
RewriteCond %{HTTP_HOST} ^example\.com$ [I]
RewriteRule ^(.*)$ www.example.com/$1 [R=301,L]
This is my SampleUrls.txt:
example.com
example.com/grants
www.example.com
www.example.com/grants
I place the files in the same directory as TestDriver.exe, and run testdriver -d . All the tests are ignored:
NO ACTION 'example.com' ==> --
NO ACTION 'example.com/grants' ==> --
NO ACTION 'www. example.com' ==> --
NO ACTION 'www. example.com/grants' ==> --
Thanks,
Ashley
The TestDriver is a standalone tool to test rewrite rules for IIRF. Unfortunately, the tool is limited, in that it cannot effectively evaluate conditions that test Server variables. There are no server variables in a standalone console-based application.
Check the doc. Here's what it says:
You need to specify an absolute URL for the substitution. Otherwise your
www.example.com
is treated as path segment.