Can anyone convert this mod rewrite rule

BEGIN DPIOptions

RewriteEngine On
RewriteRule ^thumb-(.).jpg$ thumb.php?id=$1 [L]
RewriteRule ^image-(.
).jpg$ image.php?id=$1 [L]
RewriteRule ^image-(.).gif$ image.php?id=$1&gif [L]
RewriteRule ^share-(.
).html$ share.php?id=$1 [L]
RewriteRule ^gallery-(.)-(.)-(.).html$ gallery.php?id=$2&page=$3
[L]
RewriteRule ^gallery-(.
)-(.).html$ gallery.php?id=$2 [L]
RewriteRule ^archive-(.
).html$ archive.php?page=$1 [L]
RewriteRule ^galleries-(.).html$ archive.php?page=$1 [L]
RewriteRule ^content-(.
).html$ content.php?$1 [L]
RewriteRule ^profile-(.).html$ profile.php?id=$1 [L]
RewriteRule ^images-(.
).html$ images.php?date=$1 [L]

END DPIOptions

please convert this for nginx

Posted at Nginx Forum:

On Mon, Apr 04, 2011 at 02:00:06PM -0400, onel0ve wrote:

RewriteRule ^archive-(.).html$ archive.php?page=$1 [L]
RewriteRule ^galleries-(.
).html$ archive.php?page=$1 [L]
RewriteRule ^content-(.).html$ content.php?$1 [L]
RewriteRule ^profile-(.
).html$ profile.php?id=$1 [L]
RewriteRule ^images-(.*).html$ images.php?date=$1 [L]

END DPIOptions

please convert this for nginx

Here is example of scaleable configuration:

location /thumb- {
location ~ ^/thumb-(.*).jpg$ {
fastcgi_pass …
fastcgi_param SCRIPT_FILENAME /path/to/thumb.php;
fastcgi_param QUERY_STRING id=$1;
}
}

location /image- {
location ~ ^/image-(.*).jpg$ {
fastcgi_pass …
fastcgi_param SCRIPT_FILENAME /path/to/image.php;
fastcgi_param QUERY_STRING id=$1;
}

location ~ ^/image-(.*)\.gif$ {
    fastcgi_pass   ...
    fastcgi_param  SCRIPT_FILENAME  /path/to/image.php;
    fastcgi_param  QUERY_STRING     id=$1&gif;
}

}

etc.


Igor S.
http://sysoev.ru/en/

rewrite ^thumb-(.).jpg$ /thumb.php?id=$1 last;
rewrite ^image-(.
).jpg$ /image.php?id=$1 last;

etc.

Posted at Nginx Forum:

EDIT:
i forgot to add / in front

rewrite ^/thumb-(.).jpg$ /thumb.php?id=$1 last;
rewrite ^/image-(.
).jpg$ /image.php?id=$1 last;

Posted at Nginx Forum: