|
在nginx伪静态里,换成这个3 |; }6 A: B. c7 D$ S
9 F' r8 e, d8 \, [; W% A
- location /typecho/ {
: O/ R3 E% C# h* g- ]2 @0 K3 T' k, V - if (!-e $request_filename) {
7 a! M% P0 Q( c3 J - rewrite ^(.*)$ /typecho/index.php$1 last; c$ T) L( G4 s, c8 m4 v
- }/ K: E9 S1 {* N4 [
- }. Z( j! X; @" v
- + H9 V) i, n2 B9 @6 k
; ?# d! j/ P0 D) I8 U6 t+ r$ L. u- location / {- w1 t: x- _/ z1 K8 p+ e, V
- if (-f $request_filename/index.html){% N0 V: o7 P5 d9 T! @
- rewrite (.*) $1/index.html break;
}; b2 N/ l7 @0 h2 f - }
2 t( _* v9 b; f; `2 H+ J; P - if (-f $request_filename/index.php){
+ r& \& ?$ p( U5 M0 P - rewrite (.*) $1/index.php;
. Y; ^4 n, X6 o- L# G5 e' ~" _$ s - }
Z4 S2 D! G8 h, [) C% F* S - if (!-f $request_filename){$ ]5 m5 O" D! G3 j% }2 T
- rewrite (.*) /index.php;
3 q+ F0 P; G* K. ?& |2 L - }
, G8 w3 c0 \: C, v& H" D - try_files $uri $uri/ =404;
1 c! Z4 y& ^- B& S' g5 d/ d - }
复制代码 |
|