To edit a site rule, click its corresponding Edit link. This displays the Site Rule window described in the previous section, allowing you to modify the site rules information.
To remove a site rule, select its corresponding check box, then click Delete.
For detailed information about creating and managing path rules, see Managing path rules and Editing and removing path rules.
For more information, see these topics:
A segment is a section of the URL that is delimited by a forward slash (/). A path rule consist of multiple segment rules that are applied sequentially to URLs in the monitored traffic. You can edit segment rules by clicking the Add a Segment Rule link from the Path Rules > Edit Path Rules page.
For example, consider these three URLs:
www.travel.com/regions/mexico/home.asp
www.travel.com/provinces/quebec/home.asp
www.travel.com/states/florida/home.asp
Each URL contains three segments in its path:
• |
• |
• |
segment 3: home.asp |
If you want to transform the first segment of each URL path so that regions, provinces, and states all map to the term areas, and the rest of the URL is recorded to the database as they appear, you need to define three-segment rules:
Segment rules are processed in the order in which they are listed. Each segment rule must match the current URL segment before the next segment rule is processed. If there is no match, and the segment rule is marked as Required, then this path rule does not apply to the URL in question. If the segment rule is not required, then processing advances to the next segment rule.
For example, consider a site with the following URLs:
To change the first segment of the path—support, support_au, and support_ch—so that it displays as support in the metric database, you create the rules shown in the following image.
The first rule matches when the first segment in a URL starts with support, and replaces it with support. Note that this rule matches only URLs with one segment, such as quest.com/support_ch/. However, the test data includes URLs with one or more subsequent segments, such as quest.com/support/path1/path2/page3.asp. The second rule instructs the system to match URLs with any number of subsequent segments.
The following section outlines the types of actions that a segment rule can perform on URL segments.
The Include action includes the segment in the transformed URL while the Exclude action removes the segment in the transformed URL.
Selecting the Replace segment rule action causes the segment to be replaced by the string in the Replacement string box if it matches the string in the Matching string box.
For example, consider the following path section of a monitored URL:
/products/database/mysql1/download.asp
Next, consider the following sequence of segments rules.
When these sequence rules are applied together as a path rule to the monitored URL segments, the resultant URL is:
/database_products/mysql1/download.asp
The Include while matching segment rule action specifies that any segments matching the value in the Matching string box is included in the transformed URL.
A segment rule that uses this action can be used to simplify a path rule. A series of segment rules whose action is set to Include can be replaced by a single segment rule whose action is set to Include while matching.
The third segment rule combines the Include while matching action with the regular expression to match any string (.*). This rule essentially continues to include URL segments in the resulting URL until they have been exhausted.
The Exclude while matching segment rule action specifies that any segments matching the value in the Matching string box is excluded from the transformed URL
A segment rule that uses this action can be used to simplify a path rule. A series of segment rules whose action is set to Exclude can be replaced by a single segment rule whose action is set to Exclude while matching.
where the path portion of the URL is:
The Exclude until match segment rule action discards one or more non-matching URL segments until a segment match is found, after which, the matching URL segment is included in the resulting URL.
Consider the following path sections of several fictional newssite.com URLs:
As was the case in the previous example, all news URLs begin with a date. If you wanted to aggregate the performance of all news articles, regardless of publishing date, you would want the path portion of the URL transformed to:
/news/companies/quest/index.htm
In this case, you cannot use the Exclude While Matching action because newssite.com has used non-numerical date formats in the past. Therefore, you cannot simply exclude any segments that contain numerical values. Instead, the following sequence of segment rules could be used:
The first segment rule discards all URL segments found until it finds a segment that matches its news string. Next, the date is effectively stripped from the URL, and the second segment rule takes effect, and includes the rest of the monitored URL in the resulting URL.
The Exclude until match and replace action is identical to Exclude until match, the only difference being that the matched segment is replaced with a specified string, instead of simply included in the resulting URL.
The Include until match segment rule action combines one or more non-matching URL segments until a segment match is found. Then the segment match is found, it is excluded from the resulting URL, and the previously combined non-matching URL segments are included in the resulting URL.
Considering the following path section of a URL:
The following sequence of segment rules could be used:
The first segment rule includes all URL segments found until the match, the latter representing the date that is unwanted in the resulting URL. The first URL segment is discarded as part of the Include Until Match rule, after which the second segment rule initiates, excluding the remaining URL segments until the final segment is found (index.htm).
The Include until match and replace action is identical to Include until match, the only difference being that the matched segment is replaced with a specified string, instead of being excluded from the resulting URL.
The Replace any match segment rule action examines all remaining URL segments, looking for a match. Any URL segment that matches is replaced, while segments that do not match remain unmodified.
Consider the following path section of a URL:
Assume the desired resulting URL is:
and you want to ensure that only news-related URLs are replaced.
This can be accomplished with the following sequence of segment rules:
The first action transforms the URL if and only if the /news/ segment is found, after which all numerical segments that represent the date are masked with XX. The Replace any match action always applies to all remaining URL segments.
The Session Identifier segment rule action allows you to specify a segment within the URL that should be used for identifying user sessions. This is useful for cases where the monitored application embeds session identifiers in the URL itself rather than in a cookie (for example, quest.com/support/1042004/home.asp).
See Managing variable rules for more information.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy