Rewrite profiles with IRULES

Hi,

I have a quick question around the processing order/ interaction of REWRITE profiles and IRULES.. i.e. what come first?

So I currently have a site with a rewrite profile which rewrites ‘/’ to ‘/mysite/’ this all appears to work fine and the user only sees / in the browser as requested.

On thing I am unclear about is how to make an IRULE with ‘string tolower’ work with a rewrite profile..

Any suggestions welcomed.

Many thanks

Matt