web.config to redirect except some given IPs

Posted by Alvin on Pro Webmasters See other posts from Pro Webmasters or by Alvin
Published on 2012-06-28T15:56:03Z Indexed on 2012/06/28 21:25 UTC
Read the original article Hit count: 375

Filed under:
|

I'm looking for a web.config which is equivalent as the .htaccess file below.

<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REMOTE_HOST} !^123\.123\.123\.123
RewriteCond %{REMOTE_HOST} !^321\.321\.321\.321
RewriteCond %{REQUEST_URI} !/coming-soon\.html$
RewriteRule (.*)$ /coming-soon.html [R=302,L]
</IfModule>

Which redirects everyone to a coming soon page except for the given IPs. Unfortunately I'm not familiar with IIS.

Thank you

© Pro Webmasters or respective owner

Related posts about redirects

Related posts about iis