|
|
在nginx伪静态里,换成这个( u5 j1 l$ n9 Q* G: b# `
J: ]; q/ h2 @- location /typecho/ {5 i' Q9 e4 Y2 d+ a, ^/ I
- if (!-e $request_filename) {: {( t5 s3 o' S9 ^) G5 r
- rewrite ^(.*)$ /typecho/index.php$1 last;
3 }; I" ^. q& \ - }
, q5 V* h+ U- E3 F - }5 }0 p" ], o9 r; X, B# ~
- ( b* n9 x" e6 _6 I
- , t" k+ R# n8 `4 J3 Y" F
- location / {
; h2 k) x1 L9 M" V - if (-f $request_filename/index.html){5 t. m, B, @5 v
- rewrite (.*) $1/index.html break;3 V. B+ ]+ a% ^) i, d" X
- }
8 g! l0 h% W# h! U8 N! o - if (-f $request_filename/index.php){
+ s1 @' F0 f; u! H% q% [ - rewrite (.*) $1/index.php;1 Y2 \7 X, m# K
- }
" |7 P4 e% x4 z6 |5 ] - if (!-f $request_filename){
6 W% F4 j/ t) i( c; x) N - rewrite (.*) /index.php;+ x y) q4 w+ {# f. a% d3 G: K
- }: N0 ]% f' P* O( V. Z3 g1 ^
- try_files $uri $uri/ =404;
6 A7 w3 p+ J0 c7 T - }
复制代码 |
|