URL File Extension Condition

The URL File Extension condition allows you to restrict access based on the file extension specified in the URL of the request. It compares the file extension in the URL of the current request to the extension specified in the Value field.

To set up matching for this condition, specify the following details:

Comparison: Select one of the following types:

  • Comparison: URL File: Specifies that you want the values compared as file extensions and how you want the file extensions compared. Select one of the following:

    • Equals: Indicates that the file extensions must contain the same letters, in the same order as specified in the value.

    • Starts with: Indicates that the file extensions must begin with the letters specified in the value.

    • Ends with: Indicates that the file extensions must end with the letters specified in the value.

    • Contains Substring: Indicates that the file extensions must contain the letters, in the same sequence, as specified in the Value field.

  • Comparison: Regular Expression: Matches: Specifies that you want the values compared as regular expressions.

Mode: Select the mode appropriate for the comparison type:

  • Comparison: URL File Extension: Specify whether case is important by selecting Case Sensitive or Case Insensitive.

  • Comparison: Regular Expression: Matches: Select one or more of the following:

    • Canonical Equivalence
    • Case Insensitive
    • Comments
    • Dot All
    • Multi-Line
    • Unicode
    • Unix Lines

    For regular expression syntax information, see the Javadoc for java.util.regex.Pattern.

Value: Specify the value type and value for the comparison. Select one of the following:

  • Data Entry Field: To specify a static value to compare to the file extension in the current request, select this value type and specify the file extension. You can specify the extension or the period and the extension. For example:

    .ext
    ext

    This condition does not support wildcards. If you selected URL File Extension for the comparison type, you can add multiple values:

    • Use the Edit button to access a text box where you can enter multiple values, each on a separate line. For more information, see Edit Button.

    • Use the Add button to add values one at a time.

    All entered URL file extensions are compared to the requested URL file extension until a match is found or the list is exhausted.

  • LDAP Attribute: If you have defined an LDAP attribute containing a URL or file extension, you can select this option, then select your attribute.

  • Liberty User Profile: If you have defined a Liberty User Profile attribute containing a URL or file extension, you can select this option, then select your attribute.

Result on Condition Error: Specify what the condition returns when the comparison of the two values returns an error rather than the results of the comparison. Select either False or True. If you do not want the action applied when an error occurs, select False. If you want the action applied when an error occurs, select True.