# aFleX for Exchange Server

**URL:** <https://community.a10networks.com/t/aflex-for-exchange-server/91>\
**Category:** aFleX\
**Created:** [January 12, 2011, 1:05am UTC](https://community.a10networks.com/t/aflex-for-exchange-server/91 "2011-01-12T01:05:41Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex002/uploads/a10_community/original/1X/bb9f186d33804d3044a0374e589f49fdf3be1328.png) [@system](https://community.a10networks.com/u/system)\
**Post date:** [January 12, 2011, 1:05am UTC](https://community.a10networks.com/t/aflex-for-exchange-server/91/1 "2011-01-12T01:05:41Z")

</div>

**Posted by a10jliu**

Came from a real-world deployment: Customer using Exchanger servers and need this:

1: http redirect to https: //x/owa when user tries to connect the host with no uri 2: certain directories are open to all, since these are push-mail related and user might access from Internet 3: all other directories are limited to certain IPs (could be both private and public) which are defined in a bw list:

Code:

when HTTP\_REQUEST { set checkuri [string tolower [HTTP::uri] ] # Do url redirect here if { ([HTTP::uri] matches “/”) } { HTTP::redirect “https://[HTTP::host]/owa” # Do open certain uri to all here } elseif { ( $checkuri starts\_with “/ecp”) or ( $checkuri starts\_with “/autodiscover”) or ( $checkuri starts\_with “/microsoft-server-activesync”) } { # Other directories are only open to certain IPs } else { # Limit Access set local\_addr [IP::remote\_addr] set srcIP [POLICY::bwlist id $local\_addr Exchange\_Allow] if { not ($srcIP equals 15) } { #log “Not Allowed to login” drop } #Default Service Group will handle these legitimate requests } }
