1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
if (!-d $request_filename){
	set $rule_0 1$rule_0;
}
if ($rule_0 = "1"){
	rewrite ^/(.*)$ /api.php?rquest=$1 last;
}
if (-d $request_filename){
	set $rule_1 1$rule_1;
}
if ($rule_1 = "1"){
	rewrite ^/(.*)$ /api.php last;
}
if (-e $request_filename){
	set $rule_2 1$rule_2;
}
if ($rule_2 = "1"){
	rewrite ^/(.*)$ /api.php last;
}