Nginx

nginx实现url重写

2018-11-28  本文已影响0人  IARNO
image.png

nginx配置

location  / {
     root  /home/wwwroot/test;
     index index.php index.html;
     if ( ! -e $request_filename ) {
          rewrite (.*)$ /index.php/$1;
     }
}
location  / {
     root  /home/wwwroot/test
     index index.php index.html
     try_files $uri /index.php?$uri;
}
上一篇 下一篇

猜你喜欢

热点阅读