I've seen several examples of how to match and replace a string within a POST such as here. I am wondering if it is possible to search for a string in the POST data and insert it if it doesn't exist. An example string would be something like "yourID=". Is this possible?
Yeah I am not looking to replace any data I am looking to insert a field into the post that may be missing:
This iRule will need to scan POST data from /thispage.php and POST data from /overhere/thispage.php. If "&thisParam=" is not present in the POST data the iRule will need to insert "&thisParam=" to the post data.
I can see how to replace data fairly easily, but I am unsure as to how to look for data and then insert. Keep in mind that the post fields may be different every time, some may already have &thisParam= and others will not.
I'm not sure if I understand what you meant by This iRule will need to scan POST data from /thispage.php and POST data from /overhere/thispage.php. I know that you can detect the incoming source page and URI, the "POST data from" part is the part I don't think that you can do. You can manipulate what you have (add, remove, modify), but I don't think you can collect data from a different page in a POST in an iRule, so I am assuming that you want to detect from "/thispage.php" and just modify the URI to post to "/overthere/thispage.php".