Помогите с rewrite?

Igor Sysoev is at rambler-co.ru
Fri Mar 27 16:19:15 MSK 2009


On Fri, Mar 27, 2009 at 04:35:55PM +0600, Rauan Maemirov wrote:

> location @activeCollab {
>             fastcgi_pass   kiwi;
>             fastcgi_index  index.php;
>             fastcgi_param  SCRIPT_FILENAME  /path/to/public/index.php;
>             fastcgi_param  QUERY_STRING      path_info=$request_uri;
>             include        fastcgi_params;
>         }
> 
> Но path_info судя по всему не передается. Возможно ли что
> fastcgi_params что-то затирает?

Нужно убрать QUERY_STRING из fastcgi_params.

> 2009/3/21 Igor Sysoev <is at rambler-co.ru>:
> > On Sat, Mar 21, 2009 at 04:24:21PM +0300, Igor Sysoev wrote:
> >
> >> On Sat, Mar 21, 2009 at 07:09:24PM +0600, Rauan Maemirov wrote:
> >>
> >> > Options -Indexes
> >> > <IfModule mod_rewrite.c>
> >> > RewriteEngine On
> >> > RewriteCond %{REQUEST_FILENAME} -f [OR]
> >> > RewriteCond %{REQUEST_FILENAME} -d
> >> > RewriteRule ^(.+) - [PT,L]
> >> > RewriteRule ^$ public/index.php [L]
> >> > RewriteRule ^(.*) public/index.php?path_info=$1 [L]
> >> > </IfModule>
> >> >
> >> > Не могу настроить rewrite для activeCollab. Со статикой разобрался, но
> >> > вот ключи PT, L ввели меня в ступор.
> >>
> >> Если fastcgi, то:
> >>
> >>     location / {
> >>         try_files  $uri  $uri/  @activeCollab;
> >>     }
> >>
> >>     location @activeCollab {
> >>         fastcgi_pass   ...
> >>         fastcgi_param SCRIPT_FILE_NAME  /public/index.php;
> >
> > -         fastcgi_param SCRIPT_FILE_NAME  /public/index.php;
> > +         fastcgi_param SCRIPT_FILE_NAME  /path/to/public/index.php;
> >
> >>         fastcgi_param QUERY_STRING      path_info=$request_uri;
> >>         ...
> >>     }
> >
> >
> > --
> > Игорь Сысоев
> > http://sysoev.ru
> >
> >

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





More information about the nginx-ru mailing list