Thank you TommyGFX,
i add this rules to location section of my nginx.conf, but it not work.
Please check my config. I set up SilverStripe to ss231 directory, so path is /usr/local/nginx/html/ss231 and URL http://localhost/ss231
[code]
user www-data;
worker_processes 5;
events {
worker_connections 1024;
}
http {
include mime.types;
default_type application/octet-stream;
sendfile on;
keepalive_timeout 65;
gzip on;
server {
listen 80;
server_name localhost;
location / {
root html;
index index.php index.html index.htm;
}
location /ss231/ {
root /usr/local/nginx/html/ss231;
index index.php;
if ($uri ~ "^(.*)$"){
set $rule_0 2$rule_0;
}
if (!-f $request_filename){
set $rule_0 3$rule_0;
set $bref_1 $1;
}
if ($rule_0 = "321"){
rewrite /.* /sapphire/main.php?url=$bref_1&$args last;
}
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root html;
}
location ~ \.php$ {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include /usr/local/nginx/conf/fastcgi_params;
}
}
}
[/code]