转自:https://www.cnblogs.com/MYSQLZOUQI/p/5092711.html
比如网站需要进行维护时进行配置
server { listen 80; server_name mydomain.com; # ... 省略掉 N 行代码 # 所有页面都转跳到维护页 rewrite ^(.*)$ /pages/maintain.html break; }
转自:https://www.cnblogs.com/MYSQLZOUQI/p/5092711.html
比如网站需要进行维护时进行配置
server { listen 80; server_name mydomain.com; # ... 省略掉 N 行代码 # 所有页面都转跳到维护页 rewrite ^(.*)$ /pages/maintain.html break; }