I found a better way to block some users, but not all users; this is on IIS 7.5.
- Make sure your IIS Installation has IP Address and Domain Restrictions Installed.
- Within your Root DNN installation folder, create a new folder named DownForMaintenance.
- Within this folder, create a default.htm file.
- Create your webpage as you wish to display; see below for my sample HTML code.
- Within IIS settings on your DNN website, open IP Address and Domain Restrictions.
- On the right column, select Edit Feature Settings... and set Access for unspecified clients: to DENY and click on OK.
- Next, click Add Allow Entry... and enter your computer's IP address so you can still have full access to your website.
- In the left column, again select your DNN website, then select the Error Pages setting under the IIS settings.
- There will already be a 403 staus code page; double-click to edit this entry.
- Ensure Execute a URL on this site is selected.
- Within the URL (relative to site root): box, enter /DownForMaintenance/default.htm. Click OK.
- Next in the left column, select the DownForMaintenance folder.
- Again, select IP Address and Domain Restrictions.
- In the right column, select Edit Feature Settings... and set Access for unspecified clients: to ALLOW and click OK.
- Test the website. If you have it configured correctly, you should see your normal website, but everyone else will see your custom down for maintenance page.
Here's my sample down for maintenance page; hope this will help others.
<html>
<head>
<title>Site under maintenance</title>
<style type="text/css">
BODY {font-family: 'Segoe UI',Arial;font-weight: lighter;overflow: hidden;}
H1 {font-family: 'Segoe UI', Arial;font-weight: lighter;color: #0094ff;}
#message {text-align: center;vertical-align: middle;width: 100%;}
#contents {margin-top: 25%;}
#offline {position: fixed;bottom: 0;text-align: center;vertical-align: middle;
font-size: 70%;background-color: #ffffcc;padding: 10px;margin: 10px;border: 1px solid black;}
</style>
</head>
<body>
<div id="message">
<div id="contents">
<h1>Site Under Maintenance</h1>
<p>This site is currently under maintenance. We should be back shortly. Thank you for your patience.</p>
</div>
</div>
</body>
</html>