|
|
在nginx伪静态里,换成这个
) l, e. i1 y. i u$ A# M8 }; a; O; c5 [6 V
- location /typecho/ {5 L g# i+ n; B& g. ]; {6 G+ w( d
- if (!-e $request_filename) {
h" q% S/ Z0 x) U - rewrite ^(.*)$ /typecho/index.php$1 last;
; J& x! ?2 R9 C - }
, |' e$ _* I% U S! Q" \ - }
3 P. K& ~" G5 Z# @' [- a5 t1 j/ `
) I# B) M/ \ o/ h; r- Z1 s) l4 T n1 s# X6 W
- location / {
- d" K/ |" q) @5 p. s$ r - if (-f $request_filename/index.html){
9 m' I* y- x; P, w - rewrite (.*) $1/index.html break;" W1 Q5 F$ x8 b% a, M* d
- }8 ~4 |" L @* f! c! V) _0 \# p7 Z
- if (-f $request_filename/index.php){
. \5 v- q& ~- K2 j; g* n2 P - rewrite (.*) $1/index.php;
: K9 o' H$ {3 I" l - }8 r: x8 O# e( m+ V5 u7 I2 @
- if (!-f $request_filename){
( E( U: p& Z3 k$ O, W - rewrite (.*) /index.php;
5 F& M+ a1 K# f: o) a - }
x; }9 e% q8 V4 v - try_files $uri $uri/ =404;
' p5 h, \9 A* ^ o" j9 q# B - }
复制代码 |
|