当前位置: 代码迷 >> IIS >> IIS运用ISAPI_REWRITE3返回503代码
  详细解决方案

IIS运用ISAPI_REWRITE3返回503代码

热度:9756   发布时间:2013-02-26 00:00:00.0
IIS使用ISAPI_REWRITE3返回503代码
#for 3.x
RewriteCond %{HTTP:Host} ^.*abc\.net.*$
RewriteRule (.*) /503.asp
503.asp
<%
Response.Status="503 Service Temporarily Unavailable"
%>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Temporarily Unavailable</title>
</head><body>
<h1>Service Temporarily Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>
----
503.php
<?php
ob_start();
header('HTTP/1.1 503 Service Temporarily Unavailable');
header('Status: 503 Service Temporarily Unavailable');
header('Retry-After: 3600');
header('X-Powered-By:');
?>
<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
<html><head>
<title>503 Service Temporarily Unavailable</title>
</head><body>
<h1>Service Temporarily Unavailable</h1>
<p>The server is temporarily unable to service your
request due to maintenance downtime or capacity
problems. Please try again later.</p>
</body></html>
如果有IIS的控制权,可以为站点建一个独立的应用程序池,然后把应用程序池暂停也可以。
  相关解决方案