Nginx相关
in 默认分类 with 0 comment 73 views

Nginx相关

in 默认分类 with 0 comment 73 views

隐藏后缀

http://domain/index.html隐藏掉html的后缀,可用http://domain/index直接访问

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