ISAPI rewrite issues with Plesk - convert URLs to uppercase

Aug 2, 2009 at 1:17 PM

I wanted to run this by you.  I installed the Ionics ISAPI filter on my hosting account.  It is a Windows IIS 6 server running Plesk 9.  I have walked through all the installation steps and set up a log file to track what the filter does.  I have implemented what i think to be a very basic rule and easy to determine if the filters are working.  Here is the entire contents of my .ini file.

===============

RewriteLog  C:\Inetpub\vhosts\smartlinkweb.com\httpdocs\IIRF_logs\IIRF

StatusUrl /iirfStatus

RewriteLogLevel 3

RewriteRule ^/uppercase/(.+)\.html$  /uppercase-output/#U$1#E.html  [L]

===============

 

Ok, so in theory it is supposed to change http://www.smartlinkweb.com/directory,  TO   http://www.smartlinkweb.com/DIRECTORY.

It just isnt doing it.  Here is what the log file is saying:

============


--------------------------------------------
Sun Aug 02 09:05:38 - 22392 - ReadConfig: setting LogLevel to 3
Sun Aug 02 09:05:38 - 22392 - ReadConfig: line   7: RewriteRule (rule 1)  '^/uppercase/(.+)\.html$'  '/uppercase-output/#U$1#E.html'      [L]
Sun Aug 02 09:05:38 - 22392 - ReadConfig: Done reading, found 1 rules (0 errors, 0 warnings) on 8 lines

--------------------------------------------
Sun Aug 02 09:05:38 - 22392 - Initialize: Ionic ISAPI Rewriting Filter (IIRF) v1.2.16 R4
Sun Aug 02 09:05:38 - 22392 - Initialize: config file 'C:\Inetpub\vhosts\smartlinkweb.com\httpdocs\ISAPIRewrite\lib\IsapiRewrite4.ini'
Sun Aug 02 09:05:38 - 22392 - Initialize: File watcher thread created.
Sun Aug 02 09:05:38 - 22392 - GetFilterVersion
Sun Aug 02 09:05:38 - 22392 - HttpFilterProc: SF_NOTIFY_URL_MAP
Sun Aug 02 09:05:38 - 22392 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Sun Aug 02 09:05:38 - 22392 - DoRewrites
Sun Aug 02 09:05:38 - 22392 - DoRewrites: New Url: '/'
Sun Aug 02 09:05:38 - 22392 - EvaluateRules: depth=0
Sun Aug 02 09:05:38 - 22392 - EvaluateRules: Rule 1 : -1 (No match)
Sun Aug 02 09:05:38 - 22392 - EvaluateRules: returning 0
Sun Aug 02 09:05:38 - 22392 - DoRewrites: No Rewrite
Sun Aug 02 09:05:38 - 22392 - HttpFilterProc: SF_NOTIFY_URL_MAP
Sun Aug 02 09:05:38 - 22392 - HttpFilterProc: SF_NOTIFY_URL_MAP
Sun Aug 02 09:05:38 - 20136 - DllMain THREAD_DETACH
Sun Aug 02 09:05:38 - 22392 - HttpFilterProc: SF_NOTIFY_URL_MAP
Sun Aug 02 09:05:38 - 22392 - HttpFilterProc: SF_NOTIFY_URL_MAP
Sun Aug 02 09:05:42 - 22392 - HttpFilterProc: SF_NOTIFY_URL_MAP
Sun Aug 02 09:05:42 - 22392 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Sun Aug 02 09:05:42 - 22392 - DoRewrites
Sun Aug 02 09:05:42 - 22392 - DoRewrites: New Url: '/directory'
Sun Aug 02 09:05:42 - 22392 - EvaluateRules: depth=0
Sun Aug 02 09:05:42 - 22392 - EvaluateRules: Rule 1 : -1 (No match)
Sun Aug 02 09:05:42 - 22392 - EvaluateRules: returning 0
Sun Aug 02 09:05:42 - 22392 - DoRewrites: No Rewrite
Sun Aug 02 09:05:45 - 22392 - HttpFilterProc: SF_NOTIFY_URL_MAP
Sun Aug 02 09:05:45 - 22392 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE
Sun Aug 02 09:05:45 - 22392 - DoRewrites
Sun Aug 02 09:05:45 - 22392 - DoRewrites: New Url: '/directory/'
Sun Aug 02 09:05:45 - 22392 - EvaluateRules: depth=0
Sun Aug 02 09:05:45 - 22392 - EvaluateRules: Rule 1 : -1 (No match)
Sun Aug 02 09:05:45 - 22392 - EvaluateRules: returning 0
Sun Aug 02 09:05:45 - 22392 - DoRewrites: No Rewrite
Sun Aug 02 09:05:45 - 22392 - HttpFilterProc: SF_NOTIFY_URL_MAP
Sun Aug 02 09:05:45 - 12584 - HttpFilterProc: SF_NOTIFY_URL_MAP
Sun Aug 02 09:05:45 - 12584 - HttpFilterProc: SF_NOTIFY_AUTH_COMPLETE

===============

You can see that it reads the rule and determines it to be a valid rule, but simply doesnt process it.  Am i missing some code?  Do you think there is an issue with Plesk?  I am really at a loss as to what to do next.

Let me know if you need any more information, and any input is greatly appreciated.

Thank you for your time.

 

Coordinator
Aug 2, 2009 at 3:10 PM

your rule like

  RewriteRule ^/uppercase/(.+)\.html$  /uppercase-output/#U$1#E.html  [L]

will produce this output (Assume all inputs start with http://www.smartlinkweb.com):

input output
/uppercase/hello.html /uppercase-output/HELLO.html
/uppercase/directory.html /uppercase-output/DIRECTORY.html
/directory (no match, no change)
/anything (no match, no change)

Why?
Look at the pattern. For an incoming URL to match, and for the rule to fire, the incoming URL must start with the string "/uppercase" and it must end with the string ".html". Your URL, /directory doesn't comply with either of those requirements.

if you want to uppercase ALL incoming URLs, then you need to change the pattern to something like ^/(.+)$

But I suspect you don't want that. So you;ll have to figure out what you want, and build a pattern accordingly.