How can we configure URL transformation for .NET
URL Transformations can be used to rename requests with dynamic URLs, based on certain criteria. This can be useful for grouping unique requests and reducing the Foglight Management Server load.
Any changes made to the URL Transformation properties only take effect after an IIS restart or recycle.
Property Enabled
Usage • True: Enables URL transformations.
• False: Disables URL transformations. This is the default setting.
Adding URL Transformations
When URL transformations are enabled, you can add one or more URL transformation to the list, as required.
To add an individual URL transformation:
1 In the URL Transformation area, click the URL Transform Lists box and select urlRewriteList from the list that appears.
2 Click the Edit button on the right.
3 In the DotNetAgent - urlRewriteList dialog box that appears, click Add Row.
4 Complete all of the following procedures:
• Configure an individual URL transformation: Conditions
• Configure an individual URL transformation: Condition Pattern
• Configure an individual URL transformation: Replacement Expression
• Configure an individual URL transformation: Replacement Value
Configure an individual URL transformation: Conditions
The cartridge uses the Conditions property to identify the condition type.
Property Conditions
Usage Specifies the condition type:
• Exist: Select this value if the value in the condition pattern is contained in the context path.
• Equal: Select this value if the value in the condition pattern is the same as the context path.
• Match: Select this value if the regular expression in the condition pattern matches the context path.
Configure an individual URL transformation: Condition Pattern
The cartridge uses the Condition Pattern property to specify the condition pattern.
Property Pattern
Usage Specifies the search pattern.
Configure an individual URL transformation: Replacement Expression
The cartridge uses the Replacement Expression property to specify the regular expression pattern that matches the context path for substitution.
Property Replacement Expression
Usage Specifies the regular expression pattern that matches the context path for substitution. The matching string is replaced by value specified in the Replacement Value property.
Configure an individual URL transformation: Replacement Value
The cartridge uses the Replacement Value property to substitute the matching string within the context path.
Property Replacement Value
Usage Specifies the string that substitutes the matching string within the context path. References to the capturing group are denoted by $n, where n is the number of the capturing group.
Example
The original request is /Default.aspx, and the URL Transform List column values are as follows:
• Conditions: Exist
• Condition Pattern: /
• Replacement Expression: /(D[a-zA-Z])
• Replacement Value: $1dynamic
The transformed request becomes Dedynamicfault.aspx.
Conclusions:
• The path contains a backslash character '/' defined in the Condition Pattern, which initiates the URL transform.
• The replacement expression matched /De in the original request.
• The replacement expression contains pattern grouping for D[a-zA-Z].
• The remainder of the original string, fault.aspx, is left intact.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center