Skip to end of metadata
Go to start of metadata

Purpose

Demonstrate how the redirect can be used in the Web Dispatcher.

Overview

This page will show 2 examples of how to configure the Web Dispatcher to redirect URL '/' to a custom start URL.

 

The Web Dispatcher used in this example is connected to a Solution Manager and Netweaver systems, respectively:
 

#-----------------------------------------------------------------------
# Multiple Systems
#-----------------------------------------------------------------------
wdisp/system_0 = SID=ORI, MSHOST=orisap, MSPORT=8100, SRCSRV=solmanager.pal.sap.corp:*
wdisp/system_1 = SID=CIA, MSHOST=ciasap, MSPORT=8100, SRCSRV=netweaver.pal.sap.corp:*
wdisp/system_conflict_resolution = 2


Option 1 - Using the icm/HTTP/redirect_<xx> parameter

Define an icm/HTTP/redirect_<xx> parameter on the profile.
 

Example of parameter: 

#requests coming from solmanager.pal.sap.corp are apend with /sap/bc/webdynpro/sap/ags_workcenter
icm/HTTP/redirect_0 = PREFIX=/, FOR=solmanager.pal.sap.corp, TO=/sap/bc/webdynpro/sap/ags_workcenter

#requests coming from netweaver.pal.sap.corp are append with /sap/bc/gui/sap/its/webgui
icm/HTTP/redirect_1 = PREFIX=/, FOR=netweaver.pal.sap.corp, TO=/sap/bc/gui/sap/its/webgui

 



Now the same set of rules as above were created but using the Modification Handler
 

 

Option 2 - Using the Modification Handler

It is also possible to use the parameter icm/HTTP/mod_<xx> to perform URL redirect.

Although this setup could be a bit more complex than using the Redirect parameter, it also allows more actions to be performed


Example of parameter: 

icm/HTTP/mod_0 = PREFIX=/,FILE=$(DIR_INSTANCE)/rules.txt



Example of "filter_rules.txt" file using regular expressions:
 

# This is the "filter rules file" used by the Web Dispatcher Modification handler


# requests coming from solmanager.pal.sap.corp are apend with /sap/bc/webdynpro/sap/ags_workcenter
if %{SERVER_ADDR} stricmp "10.50.32.37"
    RegIRedirectURL ^/$ /sap/bc/webdynpro/sap/ags_workcenter 


#requests coming from netweaver.pal.sap.corp are append with /sap/bc/gui/sap/its/webgui
if %{SERVER_ADDR} stricmp "10.50.32.32"
   RegIRedirectURL ^/$ /sap/bc/gui/sap/its/webgui 



Related Content

Related Documents

icm/HTTP/redirect_<xx>

icm/HTTP/mod_<xx>

Modification of HTTP Requests

Generic Profile Parameters with Ending _<xx>

Linking Modification Actions to Conditions

Using Variables in HTTP Request Modifications

Working with Regular Expressions

Related SAP Notes/KBAs

  • No labels