web.config rewrite rules to IIRF directives

Topics: Developer Forum, User Forum
Sep 15, 2011 at 3:24 PM

Is there any way to convert web.config rewrite rules to IIRF directives? I have installed IIS6 + IIRF2.0

Thanks for any help :)

Sep 15, 2011 at 4:24 PM
Edited Sep 15, 2011 at 4:27 PM

I have try this:

 

RewriteLog D:\xxxxx\ISAPI_Rewriter.Log\iirfLog.out RewriteLogLevel 3
MaxMatchCount 10

RewriteEngine ON
StatusUrl /iirfStatus

IterationLimit 5

RewriteCond %{HTTP_HOST} ^ecommerge.com [NC] 
RewriteRule ^(.*)$ http://www.ecommerge.com/$1 [L,R=301] 

RewriteRule ^(.*)-pl.html$ /store/products/default.asp?pagename=/$1 [L]

 

and it doesn't work at all. Any idea why?

Thanks

Coordinator
Sep 15, 2011 at 6:00 PM

I don't know web.config rewrite rules.

"it doesn't work"  isn't really helpful if you want help diagnosing.  You'll have to be a little more specific.

What, exactly, "doesn't work"?    What are you trying? What results do you expect to see?  What results do you actually see?

Have you tried a debugging HTTP proxy  like fiddler2 to help you diagnose this?

Sep 15, 2011 at 7:16 PM
Edited Sep 15, 2011 at 7:17 PM

I have got this to work. Proper code:

 

 

RewriteLog D:\xxxxx\ISAPI_Rewriter.Log\iirfLog.out RewriteLogLevel 3
MaxMatchCount 10

RewriteEngine ON
StatusUrl /iirfStatus

IterationLimit 5

RewriteCond %{HTTP_HOST} ^ecommerge.com [NC] 
RewriteRule ^(.*)$ http://www.ecommerge.com$1 [R=301] 

RewriteRule ^/(.*)-pl.html$ /store/products/default.asp?pagename=$1 [L]
Coordinator
Sep 15, 2011 at 11:16 PM
Edited Sep 15, 2011 at 11:17 PM

Glad to hear it's working.  I don't see what you've changed. What was the problem?

one thing: not sure, but it appears you may have RewriteLog and RewriteLogLevel on the same line. That's not correct.

They should be on separate lines. like this:

RewriteLog D:\xxxxx\ISAPI_Rewriter.Log\iirfLog.out
RewriteLogLevel 3
MaxMatchCount 10
RewriteEngine ON
StatusUrl /iirfStatus
IterationLimit 5

RewriteCond %{HTTP_HOST} ^ecommerge.com [NC] 
RewriteRule ^(.*)$ http://www.ecommerge.com$1 [R=301] 

RewriteRule ^/(.*)-pl.html$ /store/products/default.asp?pagename=$1 [L]