# NginxHttpRewriteModule compiled sequence

**URL:** <https://www.ruby-forum.com/t/nginxhttprewritemodule-compiled-sequence/238983>\
**Category:** NGINX\
**Created:** [February 6, 2014, 9:19am UTC](https://www.ruby-forum.com/t/nginxhttprewritemodule-compiled-sequence/238983 "2014-02-06T09:19:16Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Detlef\_R](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/58f4c7/32.png) [@Detlef\_R](https://www.ruby-forum.com/u/Detlef_R)\
**Post date:** [February 6, 2014, 9:19am UTC](https://www.ruby-forum.com/t/nginxhttprewritemodule-compiled-sequence/238983/1 "2014-02-06T09:19:16Z")

</div>

Hi ,

Is there a way to print all the compiled sequences of a rewrite module  
as  
documented in

[http://wiki.nginx.org/NginxHttpRewriteModule](http://wiki.nginx.org/NginxHttpRewriteModule)

This interpreter is a simple stack virtual machine. For example, the  
directive:

location [http://wiki.nginx.org/NginxHttpCoreModule#location](http://wiki.nginx.org/NginxHttpCoreModule#location) /download/  
{  
if [http://wiki.nginx.org/NginxHttpRewriteModule#if](http://wiki.nginx.org/NginxHttpRewriteModule#if) ($forbidden) {  
return [http://wiki.nginx.org/NginxHttpRewriteModule#return](http://wiki.nginx.org/NginxHttpRewriteModule#return) 403;  
}  
if [http://wiki.nginx.org/NginxHttpRewriteModule#if](http://wiki.nginx.org/NginxHttpRewriteModule#if) ($slow) {  
limit\_rate [http://wiki.nginx.org/NginxHttpCoreModule#limit\_rate](http://wiki.nginx.org/NginxHttpCoreModule#limit_rate)  
10k;  
}  
rewrite [http://wiki.nginx.org/NginxHttpRewriteModule#rewrite](http://wiki.nginx.org/NginxHttpRewriteModule#rewrite)  
^/(download/._)/media/(._)..\*$ /$1/mp3/$2.mp3 break  
[http://wiki.nginx.org/NginxHttpRewriteModule#break](http://wiki.nginx.org/NginxHttpRewriteModule#break);}

will be compiled into this sequence:

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

Thanks,  
Ajay K

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 6, 2014, 1:22pm UTC](https://www.ruby-forum.com/t/nginxhttprewritemodule-compiled-sequence/238983/2 "2014-02-06T13:22:19Z")

</div>

Hello!

On Thu, Feb 06, 2014 at 01:48:36PM +0530, Ajay k wrote:

> Is there a way to print all the compiled sequences of a rewrite module as  
> documented in
> 
> [GitHub - nginxinc/nginx-wiki: ARCHIVED -- Source for the now archived NGINX Wiki section of https://www.nginx.com · GitHub](http://wiki.nginx.org/NginxHttpRewriteModule)

No.

–  
Maxim D.

> **[nginx](http://nginx.org/)**

---

<div class="post-metadata">

**Author:** ![casper\_the\_ghost](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/58956e/32.png) [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Post date:** [February 8, 2014, 3:40am UTC](https://www.ruby-forum.com/t/nginxhttprewritemodule-compiled-sequence/238983/3 "2014-02-08T03:40:21Z")

</div>

Thanks Maxim D.
