Nginx 不區分大小寫


location ~* .*\.(gif|jpg|jpeg|bmp|png|tiff|tif|ico|wmf|js)$ {
       #         slowfs_cache    fastcache;
       #         slowfs_cache_key        $uri;
       #         slowfs_cache_valid      1d;
       #         add_header X-Cache      '$slowfs_cache_status from $host';
                expires 1h;
        }

        location / {
        if ($uri ~ [A-Z]) {
        rewrite_by_lua 'return ngx.redirect(string.lower(ngx.var.uri),ngx.HTTP_MOVED_PERMANENTLY)';}
                root $SROOT;
                index   index.html index.php index.htm;
        }


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM