Fwd: rewrite rule

Stepanov Dmitriy dmitriy.st1964 yandex.ru
2 07:41:59 UTC 2012


  /stuff/  
   http://example.ru/stuff/?somerequest    ,   http://12.34.56.78:1088.   if ӣ ,   location,         index.php

>         /stuff/, :
>
> location ~* /stuff / {
> proxy_pass http://12.34.56.78:1088;
> }

30.03.2012, 15:08, "Stepanov Dmitriy" <dmitriy.st1964  yandex.ru>:

>>   ,   
>>
>> location /stuff / {
>> proxy_pass http://12.34.56.78:1088;
>> }
>>
>>      - if .   ,  if  location,    : ӣ,  ̣    index.php?
>>
>> server {
>> listen 80;
>> server_name www.example.ru;
>>  …
>> root /var/www/site;
>> index index.php;
>>
>> if ($request_filename !~* \.(js|txt|gif|jpg|jpeg|png|css|swf|html|xml|xls|php|)$) {
>> rewrite ^(.*)$ /index.php;
>> }
>>
>> location ~ \.php$ {
>> fastcgi_pass 127.0.0.1:9000;
>> fastcgi_index index.php;
>> fastcgi_param SCRIPT_FILENAME /var/www/site$fastcgi_script_name;
>> include fastcgi_params;
>> }
>>
>> location /stuff / {
>> proxy_pass http://12.34.56.78:1088;
>> }
--------    --------



nginx-ru