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的控制权,可以为站点建一个独立的应用程序池,然后把应用程序池暂停也可以。

你可能感兴趣的:(伪静态,IIS,503)