|
|
在nginx伪静态里,换成这个. C# y7 @* W: j p; O
) D. X; j; p8 y3 y% C
- location /typecho/ {
e. `4 a u& M2 N - if (!-e $request_filename) {2 _5 w: x# `# w) _2 p+ w9 j
- rewrite ^(.*)$ /typecho/index.php$1 last; I, U |. P& G' c" L' E2 E0 Y2 M
- }
* Z5 ~0 L; A! ^( ? - }
" h9 N, I# S- K z8 l! V) ^
& B2 _) N+ L7 i- X% C% s
- j# ~$ [7 E. ^ b% s# a- location / {4 d; ^7 @ G L6 j8 M4 E6 Q( f
- if (-f $request_filename/index.html){
: d( x: N) p# o - rewrite (.*) $1/index.html break;" ?& i9 k7 E3 `+ _9 x' W4 g
- }1 ?. @4 ]. E" A' P
- if (-f $request_filename/index.php){7 F9 W( ^/ w( W9 A
- rewrite (.*) $1/index.php;. }" j3 Q4 E, ?$ X3 m
- }0 c- V0 N6 ]% y5 u( O
- if (!-f $request_filename){
8 Q# j% p$ T: }% K. {1 ` - rewrite (.*) /index.php;4 f2 Y7 C; h+ M9 k
- }
2 n" ]3 S/ l1 I) w2 W! k - try_files $uri $uri/ =404;
2 w0 j+ Z" v5 Q4 k" [ - }
复制代码 |
|