ПРОЕКТЫ 


  АРХИВ 


Apache-Talk @lexa.ru 

Inet-Admins @info.east.ru 

Filmscanners @halftone.co.uk 

Security-alerts @yandex-team.ru 

nginx-ru @sysoev.ru 


  СТАТЬИ 


  ПЕРСОНАЛЬНОЕ 


  ПРОГРАММЫ 



ПИШИТЕ
ПИСЬМА












     АРХИВ :: nginx-ru
Nginx-ru mailing list archive (nginx-ru@sysoev.ru)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



On Sat, Sep 11, 2010 at 09:42:17AM -0400, juves wrote:

> /folder/page.htm -> /folder/index.php?id=page
> /folder/ -> /folder/index.php
> 
> 
> / -> /index.php
> /forum-xxx-yyy/*, /member-xx-yyy/*, /topic-xxx-yyy/* , /rss/*,
> /register, /members -> index.php?showforum=xxx, index.php?showuser=xxx,
> index.php?showtopic=xxx..

Конфигурация без учёта /forum... и прочего.
Только для первых трёх УРЛов.

root  /home/htdocs/;

location / {
}

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

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;
}

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


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

_______________________________________________
nginx-ru mailing list
nginx-ru@xxxxxxxxx
http://nginx.org/mailman/listinfo/nginx-ru


 




Copyright © Lexa Software, 1996-2009.