|
|
在nginx伪静态里,换成这个
* p: L7 U0 j2 L) W9 a; Q3 ]$ C" K2 K7 p; J7 v- H6 q
- location /typecho/ {3 k' V4 W. G4 w4 N
- if (!-e $request_filename) {
) T f {5 i8 Y! d9 W7 V& \1 C - rewrite ^(.*)$ /typecho/index.php$1 last;8 d( Z8 d' [" p8 j! v/ \5 A- y$ b3 ~( Y
- }
' f9 K' T g1 C' n& p5 [0 b. |/ G - }* J" k8 O, t. Q
7 l( ]) v; ?: Z' |4 |. O- 8 N; @/ E( j9 w/ u4 e; x
- location / {& x3 ?. n* ^ @& l
- if (-f $request_filename/index.html){
5 W" `2 q1 p, P& [1 ^0 r - rewrite (.*) $1/index.html break;7 Y: ^7 N& }/ A+ |. a0 Y# w
- }
$ @/ }* l6 W% G+ y0 e - if (-f $request_filename/index.php){
( s- V" Y6 ~4 M1 _0 h' c) G - rewrite (.*) $1/index.php;
$ n, {) J; y- B1 Q6 v% V - }
, r! H# j, z0 [/ y - if (!-f $request_filename){
! ?6 w+ e6 O1 a* Z+ ^. J* V - rewrite (.*) /index.php;3 ]$ V* \' r3 }( ?0 s
- }
$ q5 f6 T$ m7 z/ I: m - try_files $uri $uri/ =404;0 q% k+ n; W/ n @4 i2 N
- }
复制代码 |
|