05-16-2013 07:49 AM
I usually use a htaccess file on my app server to redirect everyone but my ip to a maintenance.html page .... I was foolishly trying to do this with my app server behind Stingray traffic manager but of course it didn't work .... is there a way to do the same thing with traffic manager?
Solved! Go to Solution.
05-16-2013 08:06 AM
Try the following request rule
$ip = request.getRemoteIP();
# Don't intercept requests from my IP address
if( $ip =="22.214.171.124" ) break;
http.sendResponse( "503 Too Busy", "text/plain",
"Sorry. No one can serve you right now", "" );
There are lots of other things you could do rather than directly sending the response:
http.redirect( "http://en.wikipedia.org/wiki/Special:Random" );
Also, take a look at Using Stingray Traffic Manager as a Webserver.
Finally, you could continue to use your .htaccess solution if you passed the source IP address through to Apache, using mod_remoteip as described in IP Transparency: Preserving the Client IP address in Stingray Traffic Manager