Restrict access to unpublished directories in Exchange
Hello,
I have a requirement to allow access to certain directories within the Exchange IIS server. For e.g users are only required to get to /owa , /oab or /ews etc and access to all other directories should be dropped.
When a user connects to webmail , they come in through the URL "https://webmail.company.com" and then the "/owa" gets appended. I wrote some rules to achieve this , but however realized that the rules I wrote will only work if a user actually types in the URL " https://webmail.company.com/owa" or similar. However most of our users come in "https://webmail.company.com" and the rule does not work and if fact when i apply the rule , the appending of owa stops working as well and a user is presented with the default IIS page.
I would appreciate some help in getting this rule right. I have pasted the rule I created below:
when HTTP_REQUEST { if {[HTTP::uri] equals "/oab"} {HTTP::redirect "https://[HTTP::host]/oab" if {[HTTP::uri] equals "/ews"} {HTTP::redirect "https://[HTTP::host]/ews" if {[HTTP::uri] equals "/rpc"} {HTTP::redirect "https://[HTTP::host]/rpc" if {[HTTP::uri] equals "/cvwebrecall"} {HTTP::redirect "https://[HTTP::host]/cvwebrecall" if {[HTTP::uri] equals "/autodiscover"} {HTTP::redirect "https://[HTTP::host]/autodiscover/autodiscover.xml" if {[HTTP::uri] equals "/"} {HTTP::redirect "https://[HTTP::host]/owa" }
Thanks,
Karthik