title: RewriteCond executes curl and matches returned string pattern
body: <p>I have a token in cookie which i want to validate before redirecting. 
  The validation can be done using a curl call. as shown below</p>
  
  <p>In my <strong>httpd.conf</strong> file under <strong>Virtualhost</strong> tag i have this</p>
  
  <pre><code>RewriteEngine on
  RewriteCond curl --request POST --header "X-My-Token:MGNhZTdkMzAtMzk4Yi00NTdlLWI5NmItMGVhYWZhNjM0NGNi" http://myhost.com:8888/saml-idp/api/validate-token !^.*"valid":true.*$ [NC]
  RewriteRule .* http://SuccessURL.com
  </code></pre>
  
  <p>It gives me <strong>RewriteCond: bad flag delimiters</strong></p>
  
  <p>I know the syntax for RewriteCond can not be this way.</p>
  
  <p>Please suggest me how can i execute this curl call and check the returned response before redirecting.</p>