у тебя ДВА варианта, либо пхп, либо нет, так?&nbsp;<div>зачем делать ДВА рерайта?&nbsp;</div><div>тут логика, либо одно, либо другое&nbsp;</div><div>сделай один рерайт&nbsp;</div><div><br class="webkit-block-placeholder"></div><div><br><div><span class="gmail_quote">
2007/11/1, Dmitry &lt;<a href="mailto:nukleon@mail.ru">nukleon@mail.ru</a>&gt;:</span><blockquote class="gmail_quote" style="margin:0;margin-left:0.8ex;border-left:1px #ccc solid;padding-left:1ex">Доброе время дня и суток, Alexey!
<br><br>----- Original Message -----<br><br>From: Alexey Karagodov &lt;<a href="mailto:karagodov@gmail.com">karagodov@gmail.com</a>&gt;<br>To:&nbsp;&nbsp;<a href="mailto:nginx-ru@sysoev.ru">nginx-ru@sysoev.ru</a><br>Time: Thu, 1 Nov 2007 00:15:37 +0300
<br>Subject: Проблема с rewrite<br><br>&gt; rewrite_log on;<br>&gt; и смотреть логи, совпадает или нет, то, что Вы тут написали, с тем что запрашивается<br><br>Вот собственно логи:<br><br>2007/11/01 01:00:08 [notice] 82101#0: *1 &quot;^/(.*)$&quot; matches &quot;/&quot;, client: 
xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/&quot;, host: &quot;<a href="http://site.ru">site.ru</a>&quot;<br>2007/11/01 01:00:08 [notice] 82101#0: *1 rewritten data: &quot;/index.php&quot;, args: &quot;&quot;, client: 
xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/&quot;, host: &quot;<a href="http://site.ru">site.ru</a>&quot;<br>2007/11/01 01:00:08 [notice] 82101#0: *3 &quot;^/(.*)$&quot; matches &quot;/css/wap2.css&quot;, client: 
xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/css/wap2.css&quot;, host: &quot;<a href="http://site.ru">site.ru</a><br>&quot;, referrer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;
<br>2007/11/01 01:00:08 [notice] 82101#0: *3 rewritten data: &quot;/index.php&quot;, args: &quot;&quot;, client: xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/css/wap2.css&quot;, host: &quot;conte
<br><a href="http://nt.am">nt.am</a>&quot;, referrer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;<br>2007/11/01 01:00:08 [notice] 82101#0: *1 &quot;^/(.*)$&quot; matches &quot;/img/h.gif&quot;, client: xxx.xxx.xxx.xxx
, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/img/h.gif&quot;, host: &quot;<a href="http://site.ru">site.ru</a>&quot;, ref<br>errer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;<br>2007/11/01 01:00:08 [notice] 82101#0: *1 rewritten data: &quot;/index.php&quot;, args: &quot;&quot;, client: 
xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/img/h.gif&quot;, host: &quot;content.<br>am&quot;, referrer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;<br>2007/11/01 01:00:08 [notice] 82101#0: *3 &quot;^/(.*)$&quot; matches &quot;/img/t.gif&quot;, client: 
xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/img/t.gif&quot;, host: &quot;<a href="http://site.ru">site.ru</a>&quot;, ref<br>errer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;<br>
2007/11/01 01:00:08 [notice] 82101#0: *3 rewritten data: &quot;/index.php&quot;, args: &quot;&quot;, client: xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/img/t.gif&quot;, host: &quot;content.
<br>am&quot;, referrer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;<br>2007/11/01 01:00:09 [notice] 82101#0: *1 &quot;^/(.*)$&quot; matches &quot;/favicon.ico&quot;, client: xxx.xxx.xxx.xxx, server: <a href="http://site.ru">
site.ru</a>, URL: &quot;/favicon.ico&quot;, host: &quot;<a href="http://site.ru">site.ru</a>&quot;,<br> referrer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;<br>2007/11/01 01:00:09 [notice] 82101#0: *1 rewritten data: &quot;/index.php&quot;, args: &quot;&quot;, client: 
xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/favicon.ico&quot;, host: &quot;conten<br><a href="http://t.am">t.am</a>&quot;, referrer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;
<br>2007/11/01 01:00:11 [notice] 82101#0: *3 &quot;^/(.*)$&quot; matches &quot;/wap2/8/wap&quot;, client: xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/wap2/8/wap&quot;, host: &quot;<a href="http://site.ru">
site.ru</a>&quot;, r<br>eferrer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;<br>2007/11/01 01:00:11 [notice] 82101#0: *3 rewritten data: &quot;/index.php&quot;, args: &quot;&quot;, client: xxx.xxx.xxx.xxx, server: 
<a href="http://site.ru">site.ru</a>, URL: &quot;/wap2/8/wap&quot;, host: &quot;content<br>.am&quot;, referrer: &quot;<a href="http://site.ru/">http://site.ru/</a>&quot;<br>2007/11/01 01:00:11 [notice] 82101#0: *1 &quot;^/(.*)$&quot; matches &quot;/css/wap2.css&quot;, client: 
xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/css/wap2.css&quot;, host: &quot;<a href="http://site.ru">site.ru</a><br>&quot;, referrer: &quot;<a href="http://site.ru/wap2/8/wap">http://site.ru/wap2/8/wap
</a>&quot;<br>2007/11/01 01:00:11 [notice] 82101#0: *1 rewritten data: &quot;/index.php&quot;, args: &quot;&quot;, client: xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/css/wap2.css&quot;, host: &quot;conte
<br><a href="http://nt.am">nt.am</a>&quot;, referrer: &quot;<a href="http://site.ru/wap2/8/wap">http://site.ru/wap2/8/wap</a>&quot;<br>2007/11/01 01:00:11 [notice] 82101#0: *3 &quot;^/(.*)$&quot; matches &quot;/img/h.gif&quot;, client: 
xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/img/h.gif&quot;, host: &quot;<a href="http://site.ru">site.ru</a>&quot;, ref<br>errer: &quot;<a href="http://site.ru/wap2/8/wap">http://site.ru/wap2/8/wap
</a>&quot;<br>2007/11/01 01:00:11 [notice] 82101#0: *3 rewritten data: &quot;/index.php&quot;, args: &quot;&quot;, client: xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/img/h.gif&quot;, host: &quot;content.
<br>am&quot;, referrer: &quot;<a href="http://site.ru/wap2/8/wap">http://site.ru/wap2/8/wap</a>&quot;<br>2007/11/01 01:00:11 [notice] 82101#0: *1 &quot;^/(.*)$&quot; matches &quot;/img/t.gif&quot;, client: xxx.xxx.xxx.xxx
, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/img/t.gif&quot;, host: &quot;<a href="http://site.ru">site.ru</a>&quot;, ref<br>errer: &quot;<a href="http://site.ru/wap2/8/wap">http://site.ru/wap2/8/wap</a>&quot;
<br>2007/11/01 01:00:11 [notice] 82101#0: *1 rewritten data: &quot;/index.php&quot;, args: &quot;&quot;, client: xxx.xxx.xxx.xxx, server: <a href="http://site.ru">site.ru</a>, URL: &quot;/img/t.gif&quot;, host: &quot;content.
<br>am&quot;, referrer: &quot;<a href="http://site.ru/wap2/8/wap">http://site.ru/wap2/8/wap</a>&quot;<br><br><br>Я вижу, что правило (rewrite<br>!^.+\.(gif|jpg|png|css|zip|js|ico|txt|gz|sql|doc|xls|rar|pps)$<br>/index.php break;) не срабатывает, его задача, чтобы статические файлы
<br>не попадали под правило (rewrite&nbsp;&nbsp;^/(.*)$ /index.php break;).<br><br>Если ли возможность в nginx реализовать правило, которое работало на<br>апаче?<br><br>Буду признателен в решение данного вопроса.<br><br>&gt; 31.10.07
, Dmitry &lt; <a href="mailto:nukleon@mail.ru">nukleon@mail.ru</a>&gt; написал(а):<br>&gt; Здравствуйте, nginx-ru.<br><br>&gt; Решили перевести один проект с nginx + apache на nginx + factcgi php.<br><br>&gt; Но существует проблема c rewrite:
<br><br>&gt; у апача была такая конфигурация:<br><br>&gt; RewriteEngine On<br>&gt; RewriteBase /<br>&gt; RewriteRule<br>&gt; !\.(gif|jpg|png|css|zip|js|ico|txt|gz|sql|doc|xls|rar|pps)$ index.php<br>&gt; если переделать под nginx:
<br><br>&gt; rewrite<br>&gt; !^.+\.(gif|jpg|png|css|zip|js|ico|txt|gz|sql|doc|xls|rar|pps)$ /index.php break;<br><br>&gt; ???<br><br>&gt;<br><br>&gt; rewrite&nbsp;&nbsp;^/(.*)$ /index.php break;<br><br>&gt; ???<br><br>&gt; то графика не показывается.
<br><br>&gt; Что я не так делаю?<br><br>&gt; --<br>&gt; С уважением,<br>&gt; Dmitry<br><br><br>--<br>С уважением,<br> Dmitry<br><br><br></blockquote></div><br>&nbsp;</div>