早睡早起,方能养生!
Sleep early rise early, way to keep healthy!

Nginx vue 伪静态 且不影响后台

super
2020-06-15 17:06
views 1027

环境:

ThinkPHP5.1+  Nginx1.16.1  PHP7.1

2020-09-09日更新:

# nginx configuration by winginx.com

location ~ ^/index\.html$ { }

location / {
  if (!-e $request_filename){
    rewrite ^(.*)$ /index.html break;
  }
}


源文章:

location /admin {
if (!-e $request_filename){
rewrite ^(.*)$ /index.php?s=$1 last; break;
}
}

location / {
try_files $uri $uri/ /index.php;
}

 



分享
0 条讨论
top