,     id:<br><br>location /files/ {<br><br> location ~ ^/files/download/(<?id>[^/]+)/(<?name>.*)\.html$ {<br>proxy_set_header REAL_REMOTE_ADDR $remote_addr;<br>
proxy_set_header Host $host;<br>proxy_pass_header Set-Cookie;<br>proxy_pass <a href="http://127.0.0.1:8080/download.php?ID=$id&code=$code">http://127.0.0.1:8080/download.php?ID=$id&code=$code</a>;<br> }<br><br> location ~ ^/files/delete/(<?id>[^/]+)/(<?code>.*)$ {<br>
proxy_set_header REAL_REMOTE_ADDR $remote_addr;<br>proxy_set_header Host $host;<br>proxy_pass_header Set-Cookie;<br>set $query ID=$id&code=$code;<br>proxy_pass <a href="http://127.0.0.1:8080/delete.php?ID=$id&code=$code">http://127.0.0.1:8080/delete.php?ID=$id&code=$code</a>;<br>
 }<br><br> return 404;<br>}<br><br><div class="gmail_quote">30  2011. 16:08  Igor Sysoev <span dir="ltr"><<a href="mailto:igor@sysoev.ru">igor@sysoev.ru</a>></span> :<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div><div></div><div class="h5">On Tue, Aug 30, 2011 at 11:24:54AM +1100, Victor Kharchenko wrote:<br>
>  nginx   ,     <br>
>  <br>
>  :<br>
><br>
> RewriteEngine On<br>
> RewriteRule files/download/([^/]+)/(.*).html /download.php?ID=$1&name=$2 [L]<br>
> RewriteRule files/delete/([^/]+)/(.*) /delete.php?ID=$1&code=$2 [L]<br>
>  :<br>
>   location /files/ {<br>
>     rewrite ^/files/download/([^/]+)/(.*)\.html$<br>
> /download.php?ID=$1&name=$2 break;<br>
>     rewrite ^/files/delete/([^/]+)/(.*)$ /delete.php?ID=$1&code=$2<br>
> break;<br>
>   }<br>
>   .<br>
<br>
</div></div> "break"  "last".  ݣ   rewrite ,<br>
  , ,   FastCGI:<br>
<br>
locaiton /files/ {<br>
<br>
  location ~ ^/files/download/(<?ID>[^/]+)/(<?NAME>.*)\.html$ {<br>
    fastcgi_pass  ...<br>
    fastcgi_param  SCRIPT_FILENAME /path/to/download.php;<br>
    fastcgi_param  QUERY_STRING   ID=$id&name=$name;<br>
    ...<br>
  }<br>
<br>
  location ~ ^/files/delete/(<?ID>[^/]+)/(<?NAME>.*)\.html$ {<br>
    fastcgi_pass  ...<br>
    fastcgi_param  SCRIPT_FILENAME /path/to/delete.php;<br>
    fastcgi_param  QUERY_STRING   ID=$id&name=$name;<br>
    ...<br>
  }<br>
<br>
  return 404;<br>
}<br>
<font color="#888888"><br>
<br>
--<br>
 <br>
<a href="http://sysoev.ru" target="_blank">http://sysoev.ru</a><br>
<br>
_______________________________________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://mailman.nginx.org/mailman/listinfo/nginx-ru" target="_blank">http://mailman.nginx.org/mailman/listinfo/nginx-ru</a><br>
</font></blockquote></div><br>