Nginx rewrite

Боуман15 лет в сервисе
Данные заказчика будут вам доступны после подачи заявки
23.08.2010

Kak sdelatt tak chto by vsje zaprosy shli na inde.php

k primeru

url = http://domen.com/picture.jpg

shol by query na index.php esli faila picture.jpg fizicheski net

eto ne rabotaet

location /

{

root /home/web/$domain/$sub;

index index.php index.html index.htm;

#try_files $uri $uri/ @fallback;

if (!-e $request_filename)

{

rewrite ^(.*)$ /index.php?$1 last;

break;

}

location ~ \.php$

{

if (!-e $request_filename)

{

rewrite ^(.*)$ /index.php?$1 last;

break;

}

fastcgi_ignore_client_abort on;

fastcgi_intercept_errors off;

fastcgi_buffers 32 8k;

fastcgi_connect_timeout 3600;

fastcgi_read_timeout 3600;

fastcgi_pass 127.0.0.1:9000;

fastcgi_index index.php;

fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;

include fastcgi_params;

}

vydajot pustoj otvet 200