web.config to redirect except some given IPs
- by Alvin
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