I work for a company that manages three websites for three brands we own. I need to put a maintenance page up on one of our websites and redirect all traffic to it while we undergo routine system maintenance. I have done this before on one of our other websites with no issues and was able to debug my changes on the web server and be redirected to the maintenance page.
This is the code I added to my .htaccess file :
RewriteCond %{REMOTE_ADDR} !^111\.111\.111\.111
RewriteCond %{REQUEST_URI} !^/down\.html$ [NC]
RewriteCond %{REQUEST_URI} !\.(jpe?g?|png|gif) [NC]
RewriteRule ^(.*)$ /down.html [R=302, L]
[111.111.111.111 is replaced by my IP address in the file]
When I debug in Visual Studio on Local IIS (Google Chrome), I get the following error:
Unable to start debugging on the web server. Operation not supported. Unknown error: 0x80004005.
When I comment out these lines of code, the error goes away and the website debugs as expected without redirecting.
Can anyone see why these lines of code would cause the site to fail to debug?
User contributions licensed under CC BY-SA 3.0