MS Exchange Web access Exclusion

Topics: User Forum
Apr 8, 2008 at 4:00 PM
Hi,

I'm trying to exclude the OWA folders.

I find the rules very obscure and have no clue how to procede.

Is there a link to a guide on the rules or can someone help me out?

Thank you

RewriteRule ^(?:!(?:/exchange)) $1 [I,R=301]
RewriteRule ^(?:!(?:/ExchWeb)) $1 [I,R=301]
RewriteRule ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/$ /index.php?site=$1&section=$2&$3=$4&$5=$6&$7=$8
RewriteRule ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)$ /index.php?site=$1&section=$2&$3=$4&$5=$6&$7=$8
RewriteRule ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/$ /index.php?site=$1&section=$2&$3=$4&$5=$6
RewriteRule ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)$ /index.php?site=$1&section=$2&$3=$4&$5=$6
RewriteRule ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)/$ /index.php?site=$1&section=$2&$3=$4
RewriteRule ^/([^/\.]+)/([^/\.]+)/([^/\.]+)/([^/\.]+)$ /index.php?site=$1&section=$2&$3=$4
RewriteRule ^/([^/\.]+)/([^/\.]+)/$ /index.php?site=$1&section=$2
RewriteRule ^/([^/\.]+)/([^/\.]+)$ /index.php?site=$1&section=$2
RewriteRule ^/([^/\.]+)/$ /index.php?site=$1
RewriteRule ^/([^/\.]+)$ /index.php?site=$1
Coordinator
Apr 15, 2008 at 5:24 PM
Edited Apr 15, 2008 at 5:25 PM
Check the README.

Also example the tests in the source distribution. There is a test that is called TransformUrlSegmentsToQueryParamsIteratively that handles lots and lots of query params, as you are trying to do, iteratively. I've included the text below, but it is much more interesting to run the tests yourself, and actually see what is happening. You can try out different rules and explore the results.

# -------------------------------------------------------
 
# This rule shows how to transform a URL into a query string, piecewise, iteratively.
# In this case, each path segment in the original URL (entered in the browser)
# becomes the value of a query param, which is named "v".  That is to say, the result
# is a URL with a multiply-valued query param named v, it has many values.  The
# receiving app (in this case index.cfm) needs to iterate through all the v values.
# Presumably they will have positional significance.  In other words
# index.cfm?v=9&v=123 will mean something different from index.cfm?v=123&v=9.  But
# that is up to the application, isn't it?
 
# The way it works - we rewrite once for the first case, in order to get the question
# mark.  Subsequent passes through the filter will add query params as necessary.
# Then there is the final case.  Run this test and examine the output, and the
# meaning will be clearer.
 
 
 
# handle case with no query string .  This rule fires the first time through.
RewriteRule ^/(?!index\.cfm)([^\?\/]+)/([^\?]+)$ /$2?v=$1
 
# handle case with existing query string. This rule fires potentially multiple times.
RewriteRule ^/(?!index\.cfm)([^\?\/]+)/([^\?]+)\?(.+)$ /$2?$3&v=$1
 
# handle case with one more segment. This fires once (last).
RewriteRule ^/(?!index\.cfm)([^\/]+)\?([^\?]+)$ /index.cfm?$2&v=$1  [L]
 
# handle edge case, where there is only one segment. This fires once (last).
RewriteRule ^/(?!index\.cfm)([^\/]+)$ /index.cfm?v=$1  [L]