<html>
<head>
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
Hello,<br>
<br>
I have always difficulty with rewrite translating apache to nginx.<br>
<br>
<IfModule mod_rewrite.c><br>
RewriteEngine On<br>
#<br>
# Full path to your site<br>
#<br>
RewriteBase /<br>
# Rename Photo Names<br>
RewriteRule
^file/pic/photo/([0-9]+)/([0-9]+)/([A-Za-z0-9]{32}+)\-(.*?)([_0-9]*?)\.(.*)$
file/pic/photo/$1/$2/$3$5.$6<br>
#<br>
# Rules<br>
#<br>
RewriteCond %{REQUEST_FILENAME} !-f<br>
RewriteCond %{REQUEST_FILENAME} !-d<br>
RewriteRule ^(.*) index.php?do=/$1<br>
# Image Access Protection<br>
RewriteRule ^file/pic/photo/(.*)\.(.*)$
static/image.php?file=$1&ext=$2<br>
</IfModule><br>
<br>
<br>
It is my translation<br>
<br>
location / {<br>
rewrite
^file/pic/photo/([0-9]+)/([0-9]+)/([A-Za-z0-9]{32}+)\-(.*?)([_0-9]*?)\.(.*)$
file/pic/photo/$1/$2/$3$5.$6 break;<br>
<br>
<span class="Apple-style-span" style="color: rgb(0, 0, 0);
font-family: Arial; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: medium; display: inline !important; float: none;
">if (!-f $request_filename ) {</span><span
class="Apple-style-span" style="color: rgb(0, 0, 0); font-family:
Arial; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); font-size: medium; display:
inline !important; float: none; "></span><br style="clear: both;
color: rgb(0, 0, 0); font-family: Arial; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: medium; ">
<span class="Apple-style-span" style="color: rgb(0, 0, 0);
font-family: Arial; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: medium; display: inline !important; float: none;
">break;</span><br style="clear: both; color: rgb(0, 0, 0);
font-family: Arial; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: medium; ">
<span class="Apple-style-span" style="color: rgb(0, 0, 0);
font-family: Arial; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-indent: 0px; text-transform: none; white-space:
normal; widows: 2; word-spacing: 0px; background-color: rgb(255,
255, 255); font-size: medium; display: inline ! important; float:
none;">}<br>
<br>
</span><span class="Apple-style-span" style="color: rgb(0, 0, 0);
font-family: Arial; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: medium; display: inline !important; float: none;
">if (!-d $request_filename) {</span><span
class="Apple-style-span" style="color: rgb(0, 0, 0); font-family:
Arial; font-style: normal; font-variant: normal; font-weight:
normal; letter-spacing: normal; line-height: normal; orphans: 2;
text-align: -webkit-auto; text-indent: 0px; text-transform: none;
white-space: normal; widows: 2; word-spacing: 0px;
-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;
background-color: rgb(255, 255, 255); font-size: medium; display:
inline !important; float: none; "></span><br style="clear: both;
color: rgb(0, 0, 0); font-family: Arial; font-style: normal;
font-variant: normal; font-weight: normal; letter-spacing: normal;
line-height: normal; orphans: 2; text-align: -webkit-auto;
text-indent: 0px; text-transform: none; white-space: normal;
widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: medium; ">
<span class="Apple-style-span" style="color: rgb(0, 0, 0);
font-family: Arial; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: medium; display: inline !important; float: none;
">break;</span><br style="clear: both; color: rgb(0, 0, 0);
font-family: Arial; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: medium; ">
<span class="Apple-style-span" style="color: rgb(0, 0, 0);
font-family: Arial; font-style: normal; font-variant: normal;
font-weight: normal; letter-spacing: normal; line-height: normal;
orphans: 2; text-align: -webkit-auto; text-indent: 0px;
text-transform: none; white-space: normal; widows: 2;
word-spacing: 0px; -webkit-text-size-adjust: auto;
-webkit-text-stroke-width: 0px; background-color: rgb(255, 255,
255); font-size: medium; display: inline !important; float: none;
">}<br>
<br>
rewrite ^(.*)$ index.php?do=/$1<br>
</span>}<br>
<br>
<br>
How to convert it properly.<br>
<br>
Thanks<br>
Tseveen.<br>
<br>
</body>
</html>