|
在nginx伪静态里,换成这个
! i3 F( x) |2 ]. t: q
9 d0 C8 y. X$ }* x- location /typecho/ {! n" l4 H5 K \ Z- U
- if (!-e $request_filename) {
% G. v) X& a( t. `# }+ V4 }$ ]( G: ]: I - rewrite ^(.*)$ /typecho/index.php$1 last;& z+ T: ]7 h: f% s. \
- }9 Z# w$ f- [0 B/ e, g
- }
. J3 t) i( n i# S u% }
, C8 F# ~7 e$ ?) y, F! I9 K; a1 z- + e# G0 |4 P' d, \1 Q
- location / {5 n. |$ E! U8 c c: r' b
- if (-f $request_filename/index.html){/ {) y0 t; t$ r2 ?8 q1 p
- rewrite (.*) $1/index.html break;* f- W5 ?) A9 B$ S1 ~% Z$ Y
- }; a3 x9 E& e' M8 @8 L3 p% l! p
- if (-f $request_filename/index.php){
$ Y6 e. \, i% C. f, M4 J# ? - rewrite (.*) $1/index.php;$ F9 Y. r! w) \
- }
! b! t. a. ~: ~1 \# c7 u# | - if (!-f $request_filename){
, I# K* {# y" Z4 l3 x - rewrite (.*) /index.php;
* M4 A. \3 k/ X' z% B0 p& W - }: N( }9 U0 c" C2 H4 E) g% d
- try_files $uri $uri/ =404;
5 V- V7 x5 C6 E3 x+ b" ]$ `( x! E/ V - }
复制代码 |
|