XRule: Search Links
Use the Search links rule to look for links in the following situations:
- Any link found on the page, whether it is an exact match or a partial match. For example, the link might be inside the Href attribute, a reference inside an OBJECT tag, the Src attribute of an image, or anything that resolves itself to a link inside JavaScript™ or Flash.
- Any complete and absolute URL, such as http://www.examplecom/support/index.asp, that includes the scheme, domain and path. You would typically use this option when you know the exact URL to be found.
- The link
text, such as "My Product" inside this link
<a href=
"www.example.com/products/myproduct/index.asp
">
My Product</a>. - The link context, such as "Content will be Flash file", which finds any link to a Flash file.
For example, your corporate standards might dictate that a link to your mission statement be included on each page. You can create a link rule to check for the link, which has this partial URL: /example/global/mission_statement.html. The link rule would have that partial URL as the Original Link search text.
In another example, you might be porting a website to a new server, and you must verify that there are no links referring to the old server. You want to find all pages that contain links referring to the old server. In this case, you know the exact link to the old server is http://OldServerName/, so you would add as the Canonical URL search term: regexp:http://oldservername.
The search options on the page are combined using AND logic. Regular expressions are permitted inside the fields on this page.
When performing a search, the criteria on this page are combined using AND logic. The text fields in the template XRules all accept regular expressions as long as they are preceded by regexp:. They do not accept DOS expressions.
Page element | Description |
---|---|
Name | The name assigned to the XRule. |
Description (optional) | Describe the purpose of the XRule so that you and other users can understand what it is searching for. For example, "Search for the Contact Us link". |
Original link | Select this option to find any link on the page, whether your search text is an exact match or a partial match to the link. Enter the search text of the link in the Original Link field. |
Canonical URL | Select this option to find any absolute URL on the page that matches your search text. An absolute URL includes the scheme, domain and path; for example, http://www.examplecom/products/gizmo.asp. Enter the search text of the URL in the Canonical URL field. |
Display text | Select this option to search for the text displayed to website visitors (the text that appears between the opening <a> and closing </a> tags). |
Link Context | Select this option to narrow the
search to a particular
element. Searches with a link context will begin at the file or element
indicated. Example: you are searching for a privacy logo and you know it is always contained in an image element. In this case, you would select Link context: Content will be an image, so that the content the XRule is searching for would be contained within an image tag. |
Make the search case sensitive | Select this option if you want the search to be case sensitive. To find a match, the search criteria and the item found must be exactly the same. For example, if you entered www.example.com/Products/ASE as a case-sensitive search, it would not find www.example.com/products/Ase. |
Only search internal links | Select this option to restrict the search to the domains included in your jobs. The domains found by any particular job can be found on the Servers and Domains page. This option does not include global domains found on the Servers and Domains page on the Administration tab. |
Only enable XRule if it is required by a job or report | Select to have the XRule run only when required. If the XRule is not required by a job or report, then it will not be run. Checking this option saves time when scanning your site because the XRule only runs when necessary. |
Always enable XRule | Have the XRule run whenever the job runs. This method is the least efficient way to use an XRule. |
Always disable XRule (if job experiences problems) | Disable the XRule from a job or report. The rule will never be run, even if it is required. Disable the XRule when it causes problems with the job, such as a scan continuing indefinitely. |
This rule defines a privacy statement | Select this option when you want the pages that do not match this rule to be automatically reported in the Pages Collecting PII without a Privacy Statement Link report. |