zoukankan      html  css  js  c++  java
  • laravel nginx下 css 和js 加载 重写规则

        server {
            listen       80;
            server_name  test.hanwen.com;  
            #charset koi8-r;
    
            #access_log  logs/host.access.log  main;
    
            location / {
                root   html;
           // laravel 链接重写
                try_files $uri $uri/ /index.php?$query_string;
    
            index index.php index.html index.htm;
         // css js 规则 location
    ~ .*.(js|css)$ {   root html/dev.hanwen.com/public;     if (-f $request_filename) {       expires 1d;       break;          } }

         // img 规则 location
    ~ .*.(woff2|woff|ttf|gif|jpg|jpeg|png|bmp|swf)$ {    root html/dev.hanwen.com/public;    if (-f $request_filename) {      expires 1d;      break;    } } }
  • 相关阅读:
    整合规则引擎urule
    vue学习
    发送put请求,get请求
    jpa自定义字段
    spring的3种配置方式
    netty
    springsercurity和shiro
    git报错
    Scrapy全站数据爬取
    python操作Excel模块openpyxl
  • 原文地址:https://www.cnblogs.com/zhanghanwen16/p/8882875.html
Copyright © 2011-2022 走看看