UrlRewriteFilter 5.1.3 build 0d262f7db8cf16b93623a16961666e3ac904a7de configuration overview (generated 1/10/23 12:18 PM)


Summary of urlrewrite.xml

In total there are 13 rules, 3 outbound rules and 12 conditions in the configuration file.

Test Rule1 (rule 0)

A test rule to show a simple redirect.

URL's matching /test/status/ will be redirected to /rewrite-status.

This rule and it's conditions will use the regex matching engine.

Note, other rules will be processed after this rule.

Bild redirect test (rule 1)

URL's matching logo.gif will permanent-redirect to http://127.0.0.1:8080/urlrewrite/artifact_type.gif.

This rule and it's conditions will use the regex matching engine.

Note, other rules will be processed after this rule.

Products (rule 2)

Allows users to type product id's into urls.
ID's published in magazine.

URL's matching /products/*/*/ will be forwarded to /products.jsp.

This rule and it's conditions will use the regex matching engine.

This rule will set:

  1. An attribute on the request object called categoryId to the value null
  2. An attribute on the request object called usingFilter to the value yes

Note, other rules will be processed after this rule.

Rule 3

URL's matching /chairs/*/ will be forwarded to /products/chairs.jsp.

This rule and it's conditions will use the regex matching engine.

This rule will set:

  1. An attribute on the session object called chairShopper to the value true

Note, other rules will be processed after this rule.

Test Rule disabled (rule 4) **DISABLED**

URL's matching /test/disabled/ will be redirected to /rewrite-status.

This rule and it's conditions will use the regex matching engine.

Given that the following conditions are met.

  1. The user-agent HTTP header does NOT match the value mac and
  2. dayofmonth is equal to the value 14 and
  3. The charset HTTP header matches the value utf and
  4. user-in-role admin is equal to the value admin

Note, other rules will be processed after this rule.

Test Rule with sets (rule 5)

URL's matching /test/disabled/.

This rule and it's conditions will use the regex matching engine.

Given that the following condition is met.

  1. The user-agent HTTP header does NOT match the value mac

This rule will set:

  1. An attribute on the request object called blah to the value ass
  2. The cache-control HTTP response header to ass

Note, other rules will be processed after this rule.

Rule 6

URL's matching /test-set/([0-9]+) will be forwarded to /test-set.jsp.

This rule and it's conditions will use the regex matching engine.

Given that the following condition is met.

  1. The user-agent HTTP header does NOT match the value mac

This rule will set:

  1. An attribute on the request object called num to the value num

This rule will run:

  1. run on an instance of org.tuckey.web.filters.urlrewrite.test.TestRunObj
  2. run on an instance of org.tuckey.web.filters.urlrewrite.test.TestRunObj
  3. nonDefaultRun on an instance of org.tuckey.web.filters.urlrewrite.test.TestRunObj
  4. nonDefaultRun on an instance of org.tuckey.web.filters.urlrewrite.test.TestRunObj (a new instance will be created for each rule match)
  5. nonDefaultRun on an instance of org.tuckey.web.filters.urlrewrite.test.TestRunObj (a new instance will be created for each rule match)
Note, if init(ServletConfig) or destroy() is found on the above objects they will be run at when creating or destroying an instance.

Note, other rules will be processed after this rule.

Rule 7

URL's matching /content/([a-zA-Z]+).

This rule and it's conditions will use the regex matching engine.

This rule will set:

  1. An attribute on the request object called contentItem to the value $1

This rule will run:

  1. doGet on an instance of org.tuckey.web.filters.urlrewrite.TestServlet
Note, if init(ServletConfig) or destroy() is found on the above object they will be run at when creating or destroying an instance.

Note, other rules will be processed after this rule.

Rule 8

URL's matching /pref/([a-zA-Z]+).

This rule and it's conditions will use the regex matching engine.

Given that the following condition is met.

  1. method is equal to the value POST

This rule will run:

  1. doPost on an instance of org.tuckey.web.filters.urlrewrite.TestServlet
Note, if init(ServletConfig) or destroy() is found on the above object they will be run at when creating or destroying an instance.

Note, other rules will be processed after this rule.

Rule 9

URL's matching /test-redirect-301 will permanent-redirect to /is-this-301.

This rule and it's conditions will use the regex matching engine.

Note, other rules will be processed after this rule.

Rule 10

URL's matching /test-redirect-302 will temporary-redirect to is-this-302.

This rule and it's conditions will use the regex matching engine.

Note, other rules will be processed after this rule.

Rule 11

URL's matching /test-redirect-302 will temporary-redirect to is-this-302.

This rule and it's conditions will use the regex matching engine.

Given that the following condition is met.

  1. user-in-role devil is equal to the value devil

Note, other rules will be processed after this rule.

filenamecheck (rule 12)

URL's matching /check-uw-config-exists.txt will be forwarded to /test-set.jsp.

This rule and it's conditions will use the regex matching engine.

Given that the following condition is met.

  1. request-filename is the value null

This rule will set:

  1. An attribute on the request object called test1 to the value file exists!!!

Note, other rules will be processed after this rule.

Out test 1 (outbound rule 0)

Outbound URL's matching /page-not-for-devils(0-9)? will be rewritten to /devils-page, after response.encodeURL() has been called.

Given that the following condition is met.

  1. user-in-role devil is equal to the value devil

Note, other outbound rules will be processed after this rule.

Outbound Rule 1

Outbound URL's matching ^(.*);jsessionid=.*$ will be rewritten to $1.

Given that the following condition is met.

  1. The user-agent HTTP header matches the value googlebot.*

Note, other outbound rules will be processed after this rule.

Outbound Rule 2

Outbound URL's matching *;jsessionid=* will be rewritten to $1, after response.encodeURL() has been called.

Given that the following condition is met.

  1. The user-agent HTTP header matches the value googlebot*

Note, other outbound rules will be processed after this rule.