Need to rewite specific uri's and then send to a specific pool.

I am brand new to Irules and need help performing the following:

Example of Apache conf file on web1 servers today:

ProxyPass /index.php http://web2.domain.com/sp/index.php

ProxyPass /sp_archive/ http://web2.domain.com/sp/sp\_archive/

(there are at least 15 additional ones too.

What I would like to do is:

If I see

/index.php or

/sp_archive/ or etc…

rewrite it to prepend “/sp” to the uri

and then send it to the web2 pool

Could someone please help me with the proper syntax to write this?

Thanks in Advance!