Learn F5 Technologies, Get Answers & Share Community Solutions Join DevCentral

Filter by:
  • Solution
  • Technology

Proxy iRule

Hello everybody

I have some use cases for a proxy irule and I need recommendations on how best to implement them


RewriteRule /portal/([A-Za-z0-9])/(.) http://portal/$1/$2

RewriteRule /test/(.) http://test/$1

RewriteRule /ABC/(.) http://$1/$1/$2

Flag Rewirte

E flag Causes an environment variable VAR to be set env|E=[!]VAR[:VAL], new http-headervalue for x-orig-protocol-host, NE-flag: By default, special characters, such as & and ?, for example, will be converted to their hexcode equivalent. Using the [NE] flag prevents that from happening

URL des Requests im Format Protokoll://Host[:port} extract and Forward as header. Redmine 7678

RewriteRule .* - [E=INFO_HTTP_HOST:%{HTTP_HOST},NE]


RewriteCond %{HTTPS} on

RewriteRule .* - [E=INFO_PROTOCOL:https,NE]

RewriteCond %{HTTPS} off

RewriteRule .* - [E=INFO_PROTOCOL:http,NE]

RequestHeader set x-orig-protocol-host "%{INFO_PROTOCOL}e://%{INFO_HTTP_HOST}e"


X-Forwarded-For The IP address of the Client.

X-Forwarded-Host The original host requested by the client in the Host HTTP request header.

X-Forwarded-Server The hostname of the proxy server.


ProxyPassReverse /dogeatdog/ http://dogeatdog/dogeatdog/


when at the beginning login.bla is, flag R=redirect, default ist 302 (found) , flag L = last

RewriteRule ^/login.(.*) https://www.test-office.de/login.$1


Redirect to SSL, Session Handling Secure Cookies

RewriteRule ^/(.)/logon.(.) https://www.test-office.de/$1/logon.$2

I need an iRule solution for every scenario above, i'm not so familiar with iRules sorry

THX Manuel

Rate this Question

Answers to this Question