IIRF and aspx querystrings

Topics: Developer Forum, Project Management Forum, User Forum
Apr 16, 2011 at 3:35 PM

Hi guys,

I'm having a little bit of trouble to make IIRF working with some querystrings... as I'm not used to work with IIRF (usually I use IIS 7 rewrite engine, but I'm working in a server with IIS 6) so I believe that is something that I'm doind wrong.


After installing IIRF I was able to make normal rewrite rules, but when I have to make querystring rules... That's when the problems starts.. Theese are the rules that I can't make them work:


RewriteRule ^/items/(.*)_PID([0-9]+)$ /Product.aspx?pid=$2 [L]

RewriteRule ^/items/(.*)/(.*)/(.*)/(.*)/$ /Items.aspx?cat=$4 [L]

RewriteRule ^/items/(.*)/(.*)/(.*)/$ /items.aspx?cat=$3 [L]

RewriteRule ^/items/(.*)/(.*)/$ /items.aspx?cat=$2 [L]

RewriteRule ^/items/(.*)/$ /items.aspx?cat=$1 [L]

RewriteRule ^/search/(.*)_CAT([0-9]+)$ /Search.aspx?name=$1&cate=$2 [L]

RewriteRule ^/adv-search/_CAT-([0-9]+)/Name1-(.*)/Title-(.*)/NUM-(.*)/Name2-(.*)/Word-(.*)$ /Search.aspx?cate=$1&name=$2&title=$3&num=$4&name2=5&word=6 [L]


My rules in my IIRF ini file are:

RewriteLog  D:\IIRF Rewrite\iirfLog.out

RewriteLogLevel 3

RewriteFilterPriority HIGH


And in the global ini file: 

NotifyLog ON

RewriteEngine ON


Can you please help me with this? I had already spent almost two day and just can't make this work...

Apr 16, 2011 at 6:11 PM

Well, I can try to help.

You've explained that "it's not working" but you haven't described the results you actually see, and how that differs from the results you expect to see.  "It's not working" is not something I can really help you with.

First steps: Is IIRF installed?  is it running?  is the /iirfstatus page functioning properly?  Do you have any warnings or errors listed?  Have you been able to get IIRF logging working?  (See the page in the documentation entitled "verifying and troubleshooting installation") .

After you pass the first set of verification steps, do this: generate one or more test URLs for each rule in your ruleset.  For each incoming URL you should have a clear understanding of the rewrite or redirect result you expect to see.  Run those URLs through IIS+IIRF.  What are the results? and do they match with what you expect? 

Imagine a table, with three columns:  incoming URL, expected results, actual results.  Fill in the table for each category or flavor of rewrite you want to do.

I can help you resolve the situation where the expected results do not match the actual results.