How to convert the Apache rewrite rules in haproxy

Hello All,

I am configuring HAProxy for the first time, We are using it mainly as a reverse proxy replacing the existing OHS server to redirect to 2 Oracle E-Business Suite DMZ nodes.

We had written rewrite rules to allow and block pages on the existing OHS as below :

RewriteRule ^/OA_MEDIA/.*.(gif|jpg|jpeg|bmp|png|PNG|pdf|PDF)$ - [L]

RewriteRule ^/OA_HTML/.*.(gif|jpg|jpeg|bmp|png|PNG|pdf|PDF)$ - [L]

RewriteRule ^/OA_HTML/.*.(js|css|xss)$ - [L]

This setup was working as expected. Now, We want to replicate the same via HAProxy.

Please help with the syntax samples for writing the above Rewrite rules in HAProxy setup.

Thanks and Regards,
Thiagarajan.