|
在nginx伪静态里,换成这个) f, G( h* G8 o+ b+ l/ q$ i- m
; ]( V* I3 ?3 T, v, [- }; i
- location /typecho/ {+ Y9 C+ }5 e3 J0 B9 f" Z5 ~' O
- if (!-e $request_filename) {: q$ e; n8 s, ?% }* Z
- rewrite ^(.*)$ /typecho/index.php$1 last;
( g0 t g) y: i4 K- \! l8 m - }6 t. ~4 T. ^/ ]
- }+ Z. [9 A2 o! {1 `
9 Z+ |0 [7 L, }+ F" K- . F- W0 B" s* ^9 j J4 e7 @
- location / {8 [2 `! i% ~0 o/ p9 A1 m9 I
- if (-f $request_filename/index.html){) {6 M& f& S B
- rewrite (.*) $1/index.html break;% B6 o, ~/ a! r3 h$ _" I# m; S* Q
- }
4 k2 M5 D9 j' Y; | - if (-f $request_filename/index.php){
: B1 X# b3 M7 s; B/ ^9 @ - rewrite (.*) $1/index.php;
1 l2 p: k4 y6 C' h1 A - }
$ q5 f7 ]& \$ i3 k - if (!-f $request_filename){
! C" a3 A# b; O5 H! n - rewrite (.*) /index.php;
! ]4 _9 K6 V% T# M/ u! e - }
- P7 u1 q/ ^: s/ I* J G - try_files $uri $uri/ =404;, L! z/ X/ R7 W- t* o! z2 b
- }
复制代码 |
|