Re: исключения для правил

Igor Sysoev igor на sysoev.ru
Сб Сен 11 09:52:43 MSD 2010


On Fri, Sep 10, 2010 at 10:15:56PM -0400, juves wrote:

> тоже самое

location / {
      index index.php index.htm index.html;
      try_files $uri $uri/ /index.php?q=$uri;
}

location = /folder/ {
     fastcgi_pass  127.0.0.1:9000;
     include       /etc/nginx/fastcgi_params.conf;
     fastcgi_param SCRIPT_FILENAME /home/htdocs/folder/index.php;
     fastcgi_param QUERY_STRING    $query_string;
}

location ~ /folder/(.+\.htm)$ {
     fastcgi_pass  127.0.0.1:9000;
     include       /etc/nginx/fastcgi_params.conf;
     fastcgi_param SCRIPT_FILENAME /home/htdocs/folder/index.php;
     fastcgi_param QUERY_STRING    id=$1;
}

location ~ \.php$ {
     fastcgi_pass  127.0.0.1:9000;
     include       /etc/nginx/fastcgi_params.conf;
     fastcgi_param SCRIPT_FILENAME /home/htdocs$fastcgi_script_name;
     fastcgi_param QUERY_STRING    $query_string;
}

Из /etc/nginx/fastcgi_params.conf нужно убрать QUERY_STRING.


-- 
Игорь Сысоев
http://sysoev.ru



Подробная информация о списке рассылки nginx-ru