问题:
由於網站需要維護,需要暫停服務。我們希望用戶登入畫面時,系統強制跳轉到一個顯示網站維護中信息頁面。
不知道各位大俠有沒有辦法?
我依稀記得,只要在站點根目錄中放入一個HTML文件,就可以停掉。不過我記不起來這個文件的名字了。
解决方法:
在站点根目录放一个
app_offline.htm
文件名字必须是这个,不能改
文件
内容是
<!doctype html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=gb2312" /> <title>系统升级公告</title> <style> html{padding:0;margin:0;} body{padding:0;margin:0;text-align:center;color:#000;font-size:24px;font-family:'微软雅黑'; background-image: linear-gradient(left, green, orange, yellow); background-image: -moz-linear-gradient(left, green, orange, yellow, green); background-image: -o-linear-gradient(left, green, orange, yellow, green); background-image: -webkit-linear-gradient(left, green, orange, yellow); } h1{padding:20px 0;filter:progid:DXImageTransform.Microsoft.Gradient(gradientType=1,startColorStr=#008000,endColorStr=#FF8C00;} </style> </head> <body> <h1 style="margin-top:10%;color:blue;">系统升级公告</h1> <h2> 为了提供更好的服务,16:00至16:30之间将进行一次简短的升级,届时平台将不能浏览和内容的发布,敬请谅解。 </h2> </body> </html>