<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">Я бы как-то так сделал, без реврайта.</font></p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">server {</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   listen 80;</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   server_name stat.*********.ru;</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   access_log /var/log/nginx/access.log;</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   error_log /var/log/nginx/error.log debug;</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   root /var/www/lider;</font></p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></p>


<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   location / {</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      try_files $uri @backend;</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   }</font></p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="font-family: arial; "></span></font></p>

<font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   location </font><span class="Apple-style-span" style="font-family: monospace; font-size: medium; white-space: pre; -webkit-border-horizontal-spacing: 2px; -webkit-border-vertical-spacing: 2px; ">~ \.php$</span><span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; "> {</span></p>

<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      try_files $uri @backend;</font></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">

<font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><span class="Apple-style-span" style="font-family: arial; "></span></font></p><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">

<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;</font></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">

<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      fastcgi_index index.php;</font></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><span class="Apple-style-span" style="font-size: 13px; border-collapse: collapse; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      fastcgi_param SCRIPT_FILENAME /var/www/lider$fastcgi_script_name;</font></span></p>

<p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">

</p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; "><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      include fastcgi_params;</font></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">

</p>   }</font><p></p><div><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></div></font><p></p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   location @backend {</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      fastcgi_pass <a href="http://127.0.0.1:9000">127.0.0.1:9000</a>;</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      fastcgi_index index.php;</font></p>

<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace"><br></font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">                </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      include fastcgi_params;</font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">               </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      fastcgi_param        SCRIPT_FILENAME        /var/www/lider/index.php;</font></p>


<meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><meta http-equiv="content-type" content="text/html; charset=utf-8"><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">

<font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      fastcgi_param        SCRIPT_NAME /index.php;</font></p><p style="margin-top: 0px; margin-bottom: 0px; margin-left: 0px; margin-right: 0px; text-indent: 0px; ">

<span class="Apple-style-span" style="font-family: &#39;courier new&#39;, monospace; ">      fastcgi_param        QUERY_STRING                $uri;</span></p>
<meta http-equiv="content-type" content="text/html; charset=utf-8"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      fastcgi_param        DOCUMENT_URI                /index.php;</font></p>


<meta http-equiv="content-type" content="text/html; charset=utf-8"><p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">      fastcgi_param        REQUEST_URI                /index.php?$uri;       </font></p>


<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">   }</font></p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><font class="Apple-style-span" face="&#39;courier new&#39;, monospace">}</font></p>


<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;"></p><br><div class="gmail_quote">20 августа 2010 г. 11:04 пользователь Grohotun <span dir="ltr">&lt;<a href="mailto:nginx-forum@nginx.us">nginx-forum@nginx.us</a>&gt;</span> написал:<br>

<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Всем добрый день!<br>
Переношу одну систему на nginx + fastcgi c<br>
апача.<br>
В системе стоит такой .htaccess:<br>
<br>
AddDefaultCharset UTF-8<br>
DirectoryIndex index.php<br>
<br>
RewriteEngine on<br>
RewriteCond %{REQUEST_FILENAME} !-f<br>
RewriteCond %{REQUEST_FILENAME} !-d<br>
RewriteRule ^(.*)$ index.php?/$1 [QSA,L]<br>
<br>
<br>
по идее он должен всё передавать с<br>
index.php?auth/login на index.php/auth/login<br>
Но не хочет.<br>
Конф хоста:<br>
server {<br>
listen 80;<br>
server_name stat.*********.ru;<br>
access_log /var/log/nginx/access.log;<br>
error_log /var/log/nginx/error.log debug;<br>
<br>
location / {<br>
        root /var/www/lider;<br>
        index index.php;<br>
        rewrite_log on;<br>
<br>
        if (!-f $request_filename){<br>
                set $rule_0 1$rule_0;<br>
        }<br>
        if (!-d $request_filename){<br>
                set $rule_0 2$rule_0;<br>
        }<br>
        if ($rule_0 = &quot;21&quot;){<br>
                rewrite ^/(.php)$ /index.php?/$1 last;<br>
        }<br>
<br>
}<br>
location ~ \.php$ {<br>
        root /var/www/lider;<br>
        fastcgi_pass <a href="http://127.0.0.1:9000" target="_blank">127.0.0.1:9000</a>;<br>
        fastcgi_index index.php;<br>
        fastcgi_param SCRIPT_FILENAME<br>
/var/www/lider$fastcgi_script_name;<br>
        include fastcgi_params;<br>
        }<br>
}<br>
<br>
Соответсвенно в логих пишется:<br>
2010/08/20 11:02:58 [notice] 16433#0: *1 &quot;^/(.*)$&quot; matches<br>
&quot;/index.php/auth/login&quot;, client: 77.241.**.**, server: stat.*******.ru,<br>
request: &quot;GET /index.php/auth/login HTTP/1.1&quot;, host:<br>
&quot;stat.**********.ru&quot;<br>
2010/08/20 11:02:58 [notice] 16433#0: *1 rewritten data: &quot;/index.php&quot;,<br>
args: &quot;/index.php/auth/login&quot;, client: 77.241.***.***, server:<br>
stat.*******ru, request: &quot;GET /index.php/auth/login HTTP/1.1&quot;, host:<br>
&quot;stat.********.ru&quot;<br>
<br>
<br>
Не поможете?<br>
<br>
Posted at Nginx Forum: <a href="http://forum.nginx.org/read.php?21,121618,121618#msg-121618" target="_blank">http://forum.nginx.org/read.php?21,121618,121618#msg-121618</a><br>
<br>
<br>
_______________________________________________<br>
nginx-ru mailing list<br>
<a href="mailto:nginx-ru@nginx.org">nginx-ru@nginx.org</a><br>
<a href="http://nginx.org/mailman/listinfo/nginx-ru" target="_blank">http://nginx.org/mailman/listinfo/nginx-ru</a><br>
</blockquote></div><br>