|
在nginx伪静态里,换成这个
2 R9 v1 p( [! [* t/ e- G: W8 y- K! Y; J6 e
- location /typecho/ {
$ n2 E6 g9 ]' v. k! F - if (!-e $request_filename) {$ j& @7 @. s, X: I0 c! Y
- rewrite ^(.*)$ /typecho/index.php$1 last;
E9 f4 t- {' W3 K* K$ ^( k - }
6 z* I/ V, e* a1 n - }% ^" `8 L4 U2 ?) e, C. o
- - C, T9 S1 c: e2 b
- ; l2 c1 n8 b- n- s7 ?! h8 m) [
- location / {1 H- P' h) Z( W, ^1 \' T
- if (-f $request_filename/index.html){" _+ R% D8 a& N- x5 s/ E
- rewrite (.*) $1/index.html break;
+ q; [! Q o; H) O# d* b - }% `, `& L" T w r6 { ]
- if (-f $request_filename/index.php){
0 [ o( W7 G/ A9 p F! t - rewrite (.*) $1/index.php;$ P1 S. q4 O- D' U8 F
- }
# R7 G/ p5 F7 o0 i, | - if (!-f $request_filename){5 Z: n; D* c9 Y4 B9 |6 o g
- rewrite (.*) /index.php;
9 ^7 _7 P# |5 s# a& a- k4 [ - }
" j# K( N- k$ J9 ? - try_files $uri $uri/ =404;
9 }1 ]5 Q3 p2 K7 W0 F8 t1 r - }
复制代码 |
|