location ~ \.php$ {
try_files $uri = 404;
include fastcgi_params;
fastcgi_pass unix:/var/run/php5-fpm.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
add_header Access-Control-Allow-Origin *;
}
rewrite ^(.*)/mobile-version(.*)$ $scheme://m.example.com$2 last;
rewrite ^/filmi/$ http://domen.ru/ permanent;
keepalive_timeout 10;
client_max_body_size 64m;
rewrite ^/filmi$ http://domen.ru permanent;
service nginx restart
rewrite ^/filmi$ http://domen.ru permanent;
service nginx restart