Rewrite Rule Syntax

Jan 24, 2011 at 4:58 PM

I have the following RewriteRule that works in IIS7 but does not seem to work for Ionics Isapi Rewrite 2.1. I don't know much about the differences between this tool and IIS7 so I was hoping someone could point out why this is not working and a way I could fix this so it does work.

RewriteEngine On
RewriteCond %{DOCUMENT_ROOT}%{REQUEST_URI} !-d
RewriteRule ^([a-zA-Z0-9/-]+)$ /index.cfm%{REQUEST_URI} [PT] 

Coordinator
Jan 31, 2011 at 12:21 PM

Check the documentation for IIRF. For troubleshooting, it will tell you to look in the IIRF log. The log will tell you there's no server variable in IIRF by the name of DOCUMENT_ROOT. 

You can see all the server variables available in IIRF at this page: http://cheeso.members.winisp.net/Iirf21Help/html/bdaf0dbe-e539-4bf5-9231-1dae3b0e27a5.htm

look for the section on server variables.

Probably the closest one to what you want is APPL_PHYSICAL_PATH, but you'll have to test for yourself.