|
|
在nginx伪静态里,换成这个! M$ f1 M% `& g$ \% T
4 P5 c q7 O9 S& X
- location /typecho/ {
1 B5 ], ?/ o! W - if (!-e $request_filename) {/ K, \9 m3 t. p2 s% K1 l
- rewrite ^(.*)$ /typecho/index.php$1 last;
. |( m. w% P1 s; {# y" _ - }
: B j) _* v% s0 b - }) h. v6 \- j% l) d5 [5 Q
+ l5 F; k/ f+ L) X8 q- }- 9 r/ ~. r2 m+ Z: n! s8 G. W2 b
- location / {6 A5 a6 Y1 ]9 P4 A. Z& T# n
- if (-f $request_filename/index.html){
- M' M* y% F' L6 a( Y! s - rewrite (.*) $1/index.html break;
) C; ^7 Y/ u* z$ F. C - }0 |% v' T B% B* N: _" W
- if (-f $request_filename/index.php){
1 D' V3 j' [2 T' V - rewrite (.*) $1/index.php;
* F1 M* X4 h. G0 c* M$ e2 M - }$ h' j }: l2 A5 @, p
- if (!-f $request_filename){
' X! U; C) O; ?4 S$ b - rewrite (.*) /index.php;
/ s& o6 q$ s% G2 T- v4 h - }
. a2 s1 `, t% O* H: r5 x* l% u - try_files $uri $uri/ =404;5 b9 Z3 E `* R
- }
复制代码 |
|