URL Rewriting

When applications are proxied, it is sometimes necessary to rewrite URLs so that they render correctly. This section describes how to rewrite URLs with the rProxy

Rewriting url is made using redirects.

  • Go to Content Providers

00-contentProvider.png

  • Click edit for Content Provider you want change

01-editCP.png

  • Scroll down to URI Patterns Create s new URI Pattern:

02a-uriPatterns.png

or click edit on existing pattern:

02b-uriPatterns.png

For newly created URI pattern, configure it and add.

03-createURIPattern.png

Now you can define Redirect URL or Redirect URL Groovy Script. Redirect URL is a static, absolute or reltative url, where redirect will be made if user hit this uri pattern.

30-redirectURL.png

Redirect URL Groovy Script have precedence over static Redirect URL. It is a groovy script that returns url where redirect should be made.

30-redirectURLgroovy.png


There exist another way to do redirect. It is used mostly internally, but also can be used. rProxy can check for header with a special name OIAM_EULA_TEST_CH. If such header is set, rProxy will redirect to value stored in this header. You can read how to add headers here.