I've got a url originating from SAP Air to Apache. I'm attempting to rewrite some url using mod_rewrite, but regrettably for following url it's not working:

https://dsssloc.ril.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.xmlformpreview?XMLFormID=SAP_SRM_Announcements&edit/test=/documents/SRM/SRM%20Messages/409af2e3-ef17-2e10-5da9-f0a7512cdfc7.xml

Code in httpd.conf is the following:

RewriteCond %{QUERY_STRING} ^XMLFormID=(.*)$ 
RewriteRule "^/irj/servlet/prt/portal/prtroot.*$" https://mydssa.ril.com/irj/portal/srm/invalid [L]

Help me.

Regards, Jayendra

This will have the desired effect. I believe the only issue together with your version may be the "/" at the outset of the RewriteRule

RewriteCond %{QUERY_STRING} ^XMLFormID=(.*)$
RewriteRule ^irj/servlet/prt/portal/prtroot.*$ https://mydssa.ril.com/irj/portal/srm/invalid [L]