Redirect old web links

If there are many old links on an intranet that points to e.g. vital documents, there is a need to be able to access these documents even after an upgrade. This page explains some techniques that can be used to redirect old weblinks to a new version of IFS Applications where the hostname and URI contents might be diffrent. This technique can be used for all sorts of redirect purposes. Here is an example of redirect of DOCMAN links for both IEE and Aurena.

Contents

Example

This instruction will describe how to redirect the older types of links to new hostname and URL syntax in the links. This instruction will only show the concept of doing redirects and give an example. The exact syntax required in each specific case will not be covered in this example. Once the request ends up on the new server it up to the web server to interpret the old URL syntax.

Example of old link syntax:

http://oldserver.corpnet.ifsworld.com:58080/b2e/secured/docmaw/EdmMacro.page?DOC_CLASS=500&DOC_NO=1000002&DOC_REV=A1

Example of new link syntax:

https://newserver.corpnet.ifsworld.com:48080/main/ifsapplications/web/#/page/ManageDocuments/DocumentDetail;$filter=DocClass%20eq%20'500'%20and%20DocNo%20eq%20'1000002'%20and%20DocRev%20eq%20'A1'

The way to change the syntax is to configure a "web server rewrite" that reads the old syntax and rewrite it to the new syntax.

In the IFS Admin Console (e.g. https://newserver.corpnet.ifsworld.com:48090/ifsconsole) it is possible to add additional custom configuration to the web server.

Screenshot of configuration for OHS

The syntax of the rewrite commands is as follows (it requires understanding of regular expression and apache rewrite module):

Turn on rewite:

RewriteEngine on

A rewrite consists of two parts, a condition and a rule.

In the condition part the values of the parameters are extracted from the old url syntax. These values will be stored in %1, %2, %3, etc.

In the rule part a match of the old url path triggers a rewrite of a new url using the variables fetched from the condition. In the end comes a few directives to get the rewrite to work for this type of redirect.

Example 1 - condition + rule for b2e -> Aurena

RewriteCond  %{QUERY_STRING} ^.*DOC_CLASS=([\d]+).*DOC_NO=([\d]+).*DOC_REV=([A-Z][0-9]+).*$
RewriteRule ^(.*\/b2e\/secured\/docmaw\/EdmMacro.page.*)$    main/ifsapplications/web/#/page/ManageDocuments/DocumentDetail;$filter=DocClass\%20eq\%20'%1'\%20and\%20DocNo\%20eq\%20'%2'\%20and\%20DocRev\%20eq\%20'%3'  [R=302,L,NE,QSD]

Example 2 - condition + rule for b2b -> IEE

RewriteCond  %{QUERY_STRING} ^.*DOC_CLASS=([\d]+).*DOC_NO=([\d]+).*DOC_REV=([A-Z][0-9]+).*$
RewriteRule ^(.*\/b2b\/secured\/docmaw\/EdmMacro.page.*)$ client/runtime/Ifs.Fnd.Explorer.application?url=ifsapf:frmDocumentContainer\%3FDOC_CLASS\%3D%1\%26DOC_NO\%3D%2\%26DOC_SHEET\%3D1\%26DOC_REV\%3D%3\%26ACTION\%3DVIEW [R=302,L,NE,QSD]