You can use the remapping URL feature to remap the URL of content external to the captured pages of a session to a new destination. Remapping URLs is commonly used in situations where the external content is not available or accessible from the original site, and a copy is saved on another server to which you can remap the URL.
This remapping feature simplifies the response modification methods.
Advantages:
- You can modify based on content that you can see, instead of working to locate the content to remap.
- This method circumvents potential cross-site scripting issues that can occur in response modification of some sites.
- To remap a URL, right-click the resource in the Page Load Details display and select
Remap URL.
The formatting options that you select are applied to the Output that is generated by applying the Regular Expression to the Test Input URL string. Complete the following steps to remap the URL.
- Edit URL: The URL of the resource you selected is displayed in the topmost textbox. You
can edit this URL to make changes as needed. The URL is a regular expression pattern, so you cam
make changes using regular expression patterns.
If the URL contains query parameters (all content after a
?
in the URL), you can replace all of this content with a wildcard, so that any instance of the URL is remapped. To remap all instances of a URL with query parameters, click Replace query string with wildcard. - Format replacement: In the second textbox, you can format the output string by
referencing components of the example URL. In the example, the entire URL is replaced by adding
%4%5
. - Test Input URL: By default, this text string is the URL of the resource you selected. You can modify this text string as needed.
- Test remap: To test the remap, click Test. The regular expression
that you created is applied to the test input URL and formatted by using the formatting options you
specified to generate the Output URL.
- If the regular expression was able to be successfully applied to the input string, then a
Found
message is also displayed.
- If the regular expression was able to be successfully applied to the input string, then a
- Output URL: The generated URL.
- To apply the URL remapping, click OK.The remapping is applied to the opened session as a new replay rule.