<div dir="ltr"><div>Hi ,</div><div><br></div><div><br></div><div>Is there a way to print all the compiled sequences of a rewrite module as documented in </div><div><br></div><a href="http://wiki.nginx.org/NginxHttpRewriteModule">http://wiki.nginx.org/NginxHttpRewriteModule</a> <div>
<br></div><div><br></div><div><p style="margin:1em 0px 1em 1em;color:rgb(85,85,85);font-family:'Lucida Grande','Lucida Sans Unicode','Lucida Sans',Arial,Verdana,sans-serif;font-size:14px;line-height:17.279998779296875px;background-color:rgb(240,240,240)">
This interpreter is a simple stack virtual machine. For example, the directive:</p><div dir="ltr" class="" style="margin:0px;direction:ltr;color:rgb(85,85,85);font-family:'Lucida Grande','Lucida Sans Unicode','Lucida Sans',Arial,Verdana,sans-serif;font-size:14px;line-height:17.279998779296875px;background-color:rgb(240,240,240)">
<div class="" style="margin:0px;line-height:normal;font-family:monospace"><pre class="" style="margin:0px 4em 2em 2em;border:3px solid rgb(255,255,255);padding:0.5em;background-color:rgb(249,249,249);font-size:12px;line-height:1.2em;vertical-align:top;width:949.625px">
<a href="http://wiki.nginx.org/NginxHttpCoreModule#location" style="margin:0px;color:rgb(220,3,3);text-decoration:none"><span class="" style="margin:0px;color:rgb(0,0,102)">location</span></a> /download/ <span class="" style="margin:0px;color:rgb(102,204,102)">{</span>
  <a href="http://wiki.nginx.org/NginxHttpRewriteModule#if" style="margin:0px;color:rgb(220,3,3);text-decoration:none">if</a> <span class="" style="margin:0px;color:rgb(102,204,102)">(</span><span class="" style="margin:0px">$forbidden</span><span class="" style="margin:0px;color:rgb(102,204,102)">)</span> <span class="" style="margin:0px;color:rgb(102,204,102)">{</span>
    <a href="http://wiki.nginx.org/NginxHttpRewriteModule#return" style="margin:0px;color:rgb(220,3,3);text-decoration:none">return</a>   <span class="" style="margin:0px">403</span><span class="" style="margin:0px;color:rgb(102,204,102)">;</span>
  <span class="" style="margin:0px;color:rgb(102,204,102)">}</span>
  <a href="http://wiki.nginx.org/NginxHttpRewriteModule#if" style="margin:0px;color:rgb(220,3,3);text-decoration:none">if</a> <span class="" style="margin:0px;color:rgb(102,204,102)">(</span><span class="" style="margin:0px">$slow</span><span class="" style="margin:0px;color:rgb(102,204,102)">)</span> <span class="" style="margin:0px;color:rgb(102,204,102)">{</span>
    <a href="http://wiki.nginx.org/NginxHttpCoreModule#limit_rate" style="margin:0px;color:rgb(220,3,3);text-decoration:none"><span class="" style="margin:0px;color:rgb(0,0,102)">limit_rate</span></a>  10k<span class="" style="margin:0px;color:rgb(102,204,102)">;</span>
  <span class="" style="margin:0px;color:rgb(102,204,102)">}</span>
  <a href="http://wiki.nginx.org/NginxHttpRewriteModule#rewrite" style="margin:0px;color:rgb(220,3,3);text-decoration:none">rewrite</a>  ^/<span class="" style="margin:0px;color:rgb(102,204,102)">(</span>download/.*<span class="" style="margin:0px;color:rgb(102,204,102)">)</span>/media/<span class="" style="margin:0px;color:rgb(102,204,102)">(</span>.*<span class="" style="margin:0px;color:rgb(102,204,102)">)</span>\..*$  /$<span class="" style="margin:0px">1</span>/mp3/$<span class="" style="margin:0px">2</span>.mp3  <a href="http://wiki.nginx.org/NginxHttpRewriteModule#break" style="margin:0px;color:rgb(220,3,3);text-decoration:none">break</a><span class="" style="margin:0px;color:rgb(102,204,102)">;</span>
<span class="" style="margin:0px;color:rgb(102,204,102)">}</span></pre></div></div><p style="margin:1em 0px 1em 1em;color:rgb(85,85,85);font-family:'Lucida Grande','Lucida Sans Unicode','Lucida Sans',Arial,Verdana,sans-serif;font-size:14px;line-height:17.279998779296875px;background-color:rgb(240,240,240)">
will be compiled into this sequence:</p><pre style="margin:0px 4em 2em 2em;border:3px solid rgb(255,255,255);padding:0.5em;background-color:rgb(249,249,249);color:rgb(85,85,85);font-size:12px;width:949.625px;line-height:17.279998779296875px">
  variable $forbidden
  checking to zero
  recovery 403
  completion of entire code
  variable $slow
  checking to zero
  checkings of regular expression
  copying "/"
  copying $1
  copying "/mp3/"
  copying $2
  copying ".mp3"
  completion of regular expression
  completion of entire sequence</pre></div><div><div> <br></div><div>Thanks,</div>Ajay K
</div></div>