nginx访问静态页面无.html后缀

    location ^~ / {  
        if (!-e $request_filename){ 
           rewrite ^(.*)$ /$1.html last;
           break;
        }
        root /var/www/html;
        index index.html;
        try_files $uri $uri/ =404;
    }

你可能感兴趣的:(nginx访问静态页面无.html后缀)