|
在nginx伪静态里,换成这个
5 B# h6 u( |0 g2 L: Z$ p0 z& `4 \8 T; J3 G
- location /typecho/ {
2 ^& O4 {- O8 r+ V& @9 D0 M - if (!-e $request_filename) {8 `5 `& |) W& v% [+ k
- rewrite ^(.*)$ /typecho/index.php$1 last;7 C, j9 b' R% j! I
- }( q" h. Y+ v# d5 S, J0 x( @
- }/ w ^* v2 S! X7 S
9 U* i! m6 S8 J4 ?/ [
9 p1 K1 Y, b! _1 c( F; Y2 p- location / {
0 t$ h/ r* R3 F- H: N K - if (-f $request_filename/index.html){
. H/ [+ M9 s0 x5 J3 J - rewrite (.*) $1/index.html break;
2 s6 ]" o- u2 f! Y, @/ G: L. O. ] - }
+ p$ `7 i. B! M: w - if (-f $request_filename/index.php){
0 y6 Q: d6 ]6 [8 W7 ` - rewrite (.*) $1/index.php;
# [& J% l- E7 [% ^0 w, J! ? - }" e! M" W8 `/ N6 P+ y( P" ~
- if (!-f $request_filename){7 l2 N/ Q+ d" l6 L( W
- rewrite (.*) /index.php;: {6 R2 x3 e/ M: o- K
- }
2 Y2 W* O' k) M+ C3 K" {6 g3 j - try_files $uri $uri/ =404;2 A4 T( z- G9 I, h* _' R' ?4 ?
- }
复制代码 |
|