IIRF keeps ignoring RedirectRule

Topics: Developer Forum
Feb 15, 2010 at 3:35 PM

Hi there, as I understand it, it should be possible to use a redirectrule like this:

RedirectRule ^/upload/(.*)\.pdf$ /LinkWrap.asp?filename=/specs/$1.pdf [R=301]

The intention here is to do a 301 redirect on any PDF file in my site's /upload folder, and send the browser to my wrapper script in another folder. However the above doesn't work, and the log simply says "ReadSiteConfig: WARNING: line 14: Ignoring line: 'RedirectRule'"

I've studied several of the examples provided here, and it seems like it should work, but there's obviously something about the way I'm formatting my rule that's causing IIRF to ignore it.

Any help on this would be much appreciated.


Feb 15, 2010 at 3:46 PM

I tried your rule and it works for me.

Mon Feb 15 10:40:50 -  3400 - ReadVdirConfig: c:\webs\winx\Iirf.ini(22): RedirectRule (rule 5)  '^/upload/(.*)\.pdf$'  '/LinkWrap.asp?filename=/specs/$1.pdf'  [R=301]
Mon Feb 15 10:40:50 -  3400 - ParseRuleModifierFlags: '[R=301]'
Mon Feb 15 10:40:50 -  3400 - ReadVdirConfig: INFO: c:\webs\winx\Iirf.ini(22): Redirecting to a target that does not include an http(s):// scheme.
Mon Feb 15 10:40:50 -  3400 - ReadVdirConfig: The rule will Redirect to a target on the local machine

This is with v2.1.0.12 (beta) of IIRF.

I'm not sure what the warning you see about - it could be an older version that was less flexible about redirect tragets that lacked a scheme and server.  It could be something else in your ini file.  Without more of the log file I couldn't be sure.

I suggest you get the latest version and give it a try.



Feb 16, 2010 at 10:26 AM

Cheeso, thanks as always for your super-speedy reply. I updated the DLL to the latest version and it works perfectly now. :D

You rock!


Feb 16, 2010 at 11:57 AM

Glad to hear it's working for you Zefrem!

Thanks for the compliments. . . .