抱歉,您的浏览器无法访问本站
本页面需要浏览器支持(启用)JavaScript
了解详情 >

有时候网站需要进入维护状态,访客访问的时候给他一个提示信息即可,有没有什么简单易操作的方式呢?

这里介绍一个解决办法,直接在根目录放置一个“App_Offline.htm”文件即可,文件名不能修改,文件内容可以是一个维护状态说明:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Down for Maintenance</title>
<style type="text/css">
* {
margin: 0;
padding: 0;
}

a {
text-decoration: underline;
color: #FF381A;
}

a:hover {
text-decoration: none;
}

body {
line-height: 1.75em;
background: #fff;
font-size: 11.5pt;
color: #5A6466;
}

body,input {
font-family: Kreon, serif;
}

br.clearfix {
clear: both;
}

h1,h2,h3,h4 {
text-transform: uppercase;
font-weight: normal;
}

h2 {
font-size: 1.5em;
}

h2,h3,h4 {
font-family: "Open Sans", sans-serif;
color: #2A3436;
margin-bottom: 1em;
}

h3 {
font-size: 1.25em;
}

h4 {
font-size: 1em;
}

img.alignleft {
float: left;
margin: 5px 30px 20px 0;
}

img.aligntop {
margin: 5px 0 20px 0;
}

p {
margin-bottom: 1.5em;
}

a {
color: #2A3436;
}

.box {
margin: 0 0 250px 0;
}

img.alignleft {
float: left;
margin: 5px 30px 30px 0;
border-radius: 6px;
}

img.aligntop {
margin: 5px 0 20px 0;
border-radius: 6px;
}

#content {
padding: 0;
width: 815px;
margin: 0 0 0 0px;
}


#page {
margin: 0;
position: relative;
width: 900px;
padding: 20px 40px 0 40px;
}


#wrapper {
width: 978px;
position: relative;
background: #FFF;
margin: 0 auto 0 auto;
box-shadow: 0px 0px 300px 0px rgba(0,0,0,0.15);
border: solid 1px #82A7AD;

}


</style>

</head>
<body>
<div>&nbsp;</div>
<div id="wrapper">

<div id="page">
<div id="content">

<div class="box">
<h2>Website is Down for maintenance</h2>
<img class="alignleft" src="/Images/logo.jpg" alt="Down for maintenance" title="Down for maintenance" />
<p>
We&#39;re currently undergoing scheduled maintenance. We will come back very shortly. Please check back in fifteen minutes. Thank you for your patience.
</p>
</div>
</div>
</div>
</div>

</body>
</html>

评论