Map external links to another wiki

If you are using the Import Pages to GXwiki utility and the source wiki is online, you can specify via parameters a mapping on what to do with external links pointing to a specific location.

The following parameters are mandatory:

  • ExternalLinkMapping: 0 or 1. Set 1 to enable the future
  • ExternalLinkMappingMatch: URL mapping specifying an ID and description as groups from a regular expression.
  • ExternalLinkMappingExpression: Expression to be used to substitute the previous URL keeping ID and description.


Let's assume you this configuration:

ExternalLinkMapping = 1
ExternalLinkMappingExpression = ^<a href="http[s]?://wiki.[gxtechnical|genexus].*?.com/commwiki/servlet/wiki\?([0-9]+)(.*)" target="_blank">(.*)</a>$
ExternalLinkMappingMatch = [|%2]

During the import process, for every external link; if you have an external URL with the following pattern

<a href="" target="_blank">sample link</a>

it will be mapped to the wiki syntax

[|sample link]